Skip to content

Commit

Permalink
Fix for Bug#93111 (28894344), ConnectionUrl.java contains char U+00A7…
Browse files Browse the repository at this point in the history
… (section sign).
  • Loading branch information
fjssilva committed Nov 27, 2018
1 parent b234a88 commit 3467237
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Version 8.0.14

- Fix for Bug#93111 (28894344), ConnectionUrl.java contains char U+00A7 (section sign).

- WL#12621, DevAPI: Handling of Default Schema.

- Fix for Bug#93340 (28970166), C/J BUILD SCRIPT IS TOO VERBOSE
Expand Down
29 changes: 16 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<filter token="MYSQL_CJ_LICENSE_TYPE" value="${com.mysql.cj.build.licenseType}" />
</filterset>

<copy todir="${com.mysql.cj.build.dir.driver}" filtering="true">
<copy todir="${com.mysql.cj.build.dir.driver}" filtering="true" encoding="UTF-8" outputencoding="UTF-8">
<fileset dir="src/build/java" />
<fileset dir="src/build/misc" />
<fileset dir="src/generated/java" />
Expand All @@ -525,7 +525,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<filterset refid="licenseFilterset" />
</copy>

<copy todir="${com.mysql.cj.build.dir.driver}/lib" filtering="false">
<copy todir="${com.mysql.cj.build.dir.driver}/lib">
<fileset dir="lib" />
</copy>
</target>
Expand All @@ -537,7 +537,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o

<mkdir dir="${com.mysql.cj.testsuite.build.dir}" />

<copy todir="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" filtering="true">
<copy todir="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" filtering="true" encoding="UTF-8" outputencoding="UTF-8">
<fileset dir="src/test/java" />
<filterset refid="versionFilterset" />
<filterset refid="licenseFilterset" />
Expand Down Expand Up @@ -859,9 +859,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<checksum file="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.jar" forceOverwrite="yes" fileext=".md5" algorithm="MD5" />
<checksum file="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.jar" forceOverwrite="yes" fileext=".sha1" algorithm="SHA-1" />

<copy file="${com.mysql.cj.build.dir.driver}/pom.xml"
toFile="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.pom"
filtering="false" />
<copy file="${com.mysql.cj.build.dir.driver}/pom.xml" toFile="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.pom" />
<checksum file="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.pom" forceOverwrite="yes" fileext=".md5" algorithm="MD5" />
<checksum file="${com.mysql.cj.build.dir.maven}/${com.mysql.cj.build.driver.fullName}.pom" forceOverwrite="yes" fileext=".sha1" algorithm="SHA-1" />

Expand Down Expand Up @@ -965,7 +963,8 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false">
includeantruntime="false"
encoding="UTF-8">
<include name="**/*.java" />
<exclude name="testsuite/**" />
<exclude name="com/mysql/cj/jdbc/integration/**" />
Expand Down Expand Up @@ -1012,7 +1011,8 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false">
includeantruntime="false"
encoding="UTF-8">
<!--include name="testsuite/**" /-->
<classpath refid="com.mysql.cj.testsuite.build.classpath" />
<compilerarg line="${javac.compilerarg}" />
Expand All @@ -1038,7 +1038,8 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false">
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/integration/c3p0/**" />
<classpath refid="project.build.classpath" />
<compilerarg line="${javac.compilerarg}" />
Expand All @@ -1058,7 +1059,8 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false">
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/integration/jboss/**" />
<classpath refid="project.build.classpath" />
<compilerarg line="${javac.compilerarg}" />
Expand All @@ -1078,7 +1080,8 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false">
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/log/Log4JLogger.java" />
<classpath refid="project.build.classpath" />
<compilerarg line="${javac.compilerarg}" />
Expand Down Expand Up @@ -1369,7 +1372,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o


<target name="build-rpm" depends="-init-copy-common, -prepare-rpm-deb-commercial-props, -prepare-rpm-deb-gpl-props">
<copy file="src/build/misc/rpm.spec.in" tofile="${com.mysql.cj.build.dir}/mysql-connector-java.spec">
<copy file="src/build/misc/rpm.spec.in" tofile="${com.mysql.cj.build.dir}/mysql-connector-java.spec" encoding="UTF-8" outputencoding="UTF-8">
<filterset refid="versionFilterset" />
</copy>

Expand Down Expand Up @@ -1449,7 +1452,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<format property="time.deb.packageTimeStamp" pattern="EEE, d MMM yyyy HH:mm:ss Z" />
</tstamp>

<copy todir="build/deb/src/debian" overwrite="true">
<copy todir="build/deb/src/debian" overwrite="true" encoding="UTF-8" outputencoding="UTF-8">
<fileset dir="src/build/misc/debian.in" />
<filterset refid="versionFilterset" />
<filterset>
Expand Down
16 changes: 8 additions & 8 deletions src/main/core-api/java/com/mysql/cj/MysqlType.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@ public enum MysqlType implements SQLType {
SET("SET", Types.CHAR, String.class, 0, MysqlType.IS_NOT_DECIMAL, 64L, "('value1','value2',...) [CHARACTER SET charset_name] [COLLATE collation_name]"),
/**
* TINYBLOB
* A BLOB column with a maximum length of 255 (28 1) bytes. Each TINYBLOB value is stored using a
* A BLOB column with a maximum length of 255 (28 - 1) bytes. Each TINYBLOB value is stored using a
* 1-byte length prefix that indicates the number of bytes in the value.
*
* Protocol:FIELD_TYPE_TINY_BLOB = 249
*/
TINYBLOB("TINYBLOB", Types.VARBINARY, null, 0, MysqlType.IS_NOT_DECIMAL, 255L, ""),
/**
* TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
* A TEXT column with a maximum length of 255 (28 1) characters. The effective maximum length
* A TEXT column with a maximum length of 255 (28 - 1) characters. The effective maximum length
* is less if the value contains multibyte characters. Each TINYTEXT value is stored using
* a 1-byte length prefix that indicates the number of bytes in the value.
*
Expand All @@ -339,15 +339,15 @@ public enum MysqlType implements SQLType {
TINYTEXT("TINYTEXT", Types.VARCHAR, String.class, 0, MysqlType.IS_NOT_DECIMAL, 255L, " [CHARACTER SET charset_name] [COLLATE collation_name]"),
/**
* MEDIUMBLOB
* A BLOB column with a maximum length of 16,777,215 (224 1) bytes. Each MEDIUMBLOB value is stored
* A BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each MEDIUMBLOB value is stored
* using a 3-byte length prefix that indicates the number of bytes in the value.
*
* Protocol: FIELD_TYPE_MEDIUM_BLOB = 250
*/
MEDIUMBLOB("MEDIUMBLOB", Types.LONGVARBINARY, null, 0, MysqlType.IS_NOT_DECIMAL, 16777215L, ""),
/**
* MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
* A TEXT column with a maximum length of 16,777,215 (224 1) characters. The effective maximum length
* A TEXT column with a maximum length of 16,777,215 (224 - 1) characters. The effective maximum length
* is less if the value contains multibyte characters. Each MEDIUMTEXT value is stored using a 3-byte
* length prefix that indicates the number of bytes in the value.
*
Expand All @@ -356,7 +356,7 @@ public enum MysqlType implements SQLType {
MEDIUMTEXT("MEDIUMTEXT", Types.LONGVARCHAR, String.class, 0, MysqlType.IS_NOT_DECIMAL, 16777215L, " [CHARACTER SET charset_name] [COLLATE collation_name]"),
/**
* LONGBLOB
* A BLOB column with a maximum length of 4,294,967,295 or 4GB (232 1) bytes. The effective maximum length
* A BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1) bytes. The effective maximum length
* of LONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available
* memory. Each LONGBLOB value is stored using a 4-byte length prefix that indicates the number of bytes in the value.
*
Expand All @@ -365,7 +365,7 @@ public enum MysqlType implements SQLType {
LONGBLOB("LONGBLOB", Types.LONGVARBINARY, null, 0, MysqlType.IS_NOT_DECIMAL, 4294967295L, ""),
/**
* LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
* A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 1) characters. The effective
* A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1) characters. The effective
* maximum length is less if the value contains multibyte characters. The effective maximum length
* of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol
* and available memory. Each LONGTEXT value is stored using a 4-byte length prefix that indicates
Expand All @@ -376,7 +376,7 @@ public enum MysqlType implements SQLType {
LONGTEXT("LONGTEXT", Types.LONGVARCHAR, String.class, 0, MysqlType.IS_NOT_DECIMAL, 4294967295L, " [CHARACTER SET charset_name] [COLLATE collation_name]"),
/**
* BLOB[(M)]
* A BLOB column with a maximum length of 65,535 (216 1) bytes. Each BLOB value is stored using
* A BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each BLOB value is stored using
* a 2-byte length prefix that indicates the number of bytes in the value.
* An optional length M can be given for this type. If this is done, MySQL creates the column as
* the smallest BLOB type large enough to hold values M bytes long.
Expand All @@ -386,7 +386,7 @@ public enum MysqlType implements SQLType {
BLOB("BLOB", Types.LONGVARBINARY, null, 0, MysqlType.IS_NOT_DECIMAL, 65535L, "[(M)]"),
/**
* TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
* A TEXT column with a maximum length of 65,535 (216 1) characters. The effective maximum length
* A TEXT column with a maximum length of 65,535 (216 - 1) characters. The effective maximum length
* is less if the value contains multibyte characters. Each TEXT value is stored using a 2-byte length
* prefix that indicates the number of bytes in the value.
* An optional length M can be given for this type. If this is done, MySQL creates the column as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public static ConnectionUrl getConnectionUrlInstance(String connString, Properti
*/
private static String buildConnectionStringCacheKey(String connString, Properties info) {
StringBuilder sbKey = new StringBuilder(connString);
sbKey.append("§");
sbKey.append("\u00A7"); // Section sign.
sbKey.append(
info == null ? null : info.stringPropertyNames().stream().map(k -> k + "=" + info.getProperty(k)).collect(Collectors.joining(", ", "{", "}")));
return sbKey.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public Xid[] recover(int flag) throws XAException {

protected static Xid[] recover(Connection c, int flag) throws XAException {
/*
* The XA RECOVER statement returns information for those XA transactions on the MySQL server that are in the PREPARED state. (See Section 13.4.7.2, XA
* Transaction States.) The output includes a row for each such XA transaction on the server, regardless of which client started it.
* The XA RECOVER statement returns information for those XA transactions on the MySQL server that are in the PREPARED state. (See Section 13.4.7.2, "XA
* Transaction States".) The output includes a row for each such XA transaction on the server, regardless of which client started it.
*
* XA RECOVER output rows look like this (for an example xid value consisting of the parts 'abc', 'def', and 7):
*
Expand Down

0 comments on commit 3467237

Please sign in to comment.