Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mysql/mysql-connector-j
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.1.45
Choose a base ref
...
head repository: mysql/mysql-connector-j
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.1.46
Choose a head ref
  • 16 commits
  • 31 files changed
  • 2 contributors

Commits on Nov 20, 2017

  1. Post-release changes.

    fjssilva committed Nov 20, 2017
    Copy the full SHA
    c7adefe View commit details
  2. Copy the full SHA
    b9818b2 View commit details

Commits on Dec 1, 2017

  1. Fix for Bug#79612 (22362474), CONNECTION ATTRIBUTES LOST WHEN CONNECTING

    WITHOUT DEFAULT DATABASE.
    soklakov committed Dec 1, 2017
    Copy the full SHA
    a81a307 View commit details
  2. Fix for Bug#79612 tests.

    soklakov committed Dec 1, 2017
    Copy the full SHA
    aff510c View commit details

Commits on Dec 20, 2017

  1. Copy the full SHA
    f225df9 View commit details

Commits on Jan 27, 2018

  1. Copy the full SHA
    b79d648 View commit details

Commits on Jan 31, 2018

  1. Fix for Bug#88227 (27029657), Connector/J 5.1.44 cannot be used again…

    …st MySQL 5.7.20 without warnings.
    fjssilva committed Jan 31, 2018
    Copy the full SHA
    2c80333 View commit details

Commits on Feb 1, 2018

  1. Copy the full SHA
    500199b View commit details
  2. Copy the full SHA
    40bf621 View commit details
  3. Copy the full SHA
    e42ce76 View commit details
  4. Copy the full SHA
    d2f8baa View commit details
  5. Copy the full SHA
    c3253fd View commit details

Commits on Feb 2, 2018

  1. Fix for Bug#86741 (26314325), Multi-Host connection with autocommit=0…

    … getAutoCommit maybe wrong.
    fjssilva committed Feb 2, 2018
    Copy the full SHA
    88bd339 View commit details

Commits on Feb 5, 2018

  1. Copy the full SHA
    4a29588 View commit details

Commits on Feb 22, 2018

  1. Copy the full SHA
    b0b76be View commit details

Commits on Feb 26, 2018

  1. Copy the full SHA
    9cc87a4 View commit details
Showing with 1,353 additions and 266 deletions.
  1. +0 −5 .classpath
  2. +3 −3 .externalToolBuilders/Ant_Builder.launch
  3. +1 −1 .project
  4. +20 −0 .settings/org.eclipse.jdt.core.prefs
  5. +1 −1 .settings/org.eclipse.jdt.ui.prefs
  6. +18 −0 CHANGES
  7. +1 −1 README
  8. +9 −2 build.xml
  9. +6 −2 src/com/mysql/jdbc/AuthenticationPlugin.java
  10. +27 −42 src/com/mysql/jdbc/ConnectionImpl.java
  11. +28 −2 src/com/mysql/jdbc/ConnectionPropertiesImpl.java
  12. +14 −17 src/com/mysql/jdbc/ExportControlled.java
  13. +46 −32 src/com/mysql/jdbc/LoadBalancedAutoCommitInterceptor.java
  14. +24 −1 src/com/mysql/jdbc/LoadBalancedConnectionProxy.java
  15. +16 −5 src/com/mysql/jdbc/MultiHostConnectionProxy.java
  16. +24 −13 src/com/mysql/jdbc/MysqlIO.java
  17. +15 −1 src/com/mysql/jdbc/ReplicationConnectionProxy.java
  18. +57 −3 src/com/mysql/jdbc/Security.java
  19. +167 −0 src/com/mysql/jdbc/authentication/CachingSha2PasswordPlugin.java
  20. +4 −1 src/com/mysql/jdbc/authentication/MysqlClearPasswordPlugin.java
  21. +3 −1 src/com/mysql/jdbc/authentication/MysqlNativePasswordPlugin.java
  22. +3 −1 src/com/mysql/jdbc/authentication/MysqlOldPasswordPlugin.java
  23. +22 −14 src/com/mysql/jdbc/authentication/Sha256PasswordPlugin.java
  24. +6 −1 src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java
  25. +32 −6 src/testsuite/BaseTestCase.java
  26. +1 −0 src/testsuite/regression/CallableStatementRegressionTest.java
  27. +764 −99 src/testsuite/regression/ConnectionRegressionTest.java
  28. +1 −0 src/testsuite/regression/ResultSetRegressionTest.java
  29. +4 −2 src/testsuite/regression/StatementRegressionTest.java
  30. +6 −2 src/testsuite/regression/SyntaxRegressionTest.java
  31. +30 −8 src/testsuite/simple/ConnectionTest.java
5 changes: 0 additions & 5 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/JDBC4*.java|**/jdbc4*/**" kind="src" path="src"/>
<classpathentry kind="var" path="JSSE_JAR">
<attributes>
<attribute name="javadoc_location" value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="src/lib/jboss-common-jdbc-wrapper.jar"/>
<classpathentry kind="lib" path="src/lib/c3p0-0.9.1-pre6.jar"/>
<classpathentry kind="lib" path="src/lib/slf4j-api-1.6.1.jar"/>
6 changes: 3 additions & 3 deletions .externalToolBuilders/Ant_Builder.launch
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/ConnectorJ"/>
<listEntry value="/ConnectorJ 51"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
@@ -13,8 +13,8 @@
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ConnectorJ"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/ConnectorJ/build.xml}"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ConnectorJ 51"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/ConnectorJ 51/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ConnectorJ</name>
<name>ConnectorJ 51</name>
<comment></comment>
<projects>
</projects>
20 changes: 20 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -122,6 +122,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -135,8 +136,11 @@ org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
@@ -146,6 +150,8 @@ org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
@@ -172,6 +178,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
@@ -204,6 +211,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
@@ -398,12 +406,24 @@ org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
2 changes: 1 addition & 1 deletion .settings/org.eclipse.jdt.ui.prefs
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_ConnectorJ Team
formatter_settings_version=12
formatter_settings_version=13
internal.default.compliance=default
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;testsuite;
18 changes: 18 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Changelog
# https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/

Version 5.1.46

- WL#11629, Change caching_sha2_password padding.

- Fix for Bug#86741 (26314325), Multi-Host connection with autocommit=0 getAutoCommit maybe wrong.

- Fix for Bug#27231383, PROVIDE MAVEN-FRIENDLY COMMERCIAL PACKAGES WITHOUT "-BIN".

- Fix for Bug#26819691, SETTING PACKETDEBUGBUFFERSIZE=0 RESULTS IN CONNECTION FAILURE.

- WL#11200, Add caching_sha2_password support.

- Fix for Bug#88227 (27029657), Connector/J 5.1.44 cannot be used against MySQL 5.7.20 without warnings.

- Fix for Bug#27374581, CONNECTION FAILS WHEN GPL SERVER STARTED WITH TLS-VERSION=TLSV1.2.

- Fix for Bug#79612 (22362474), CONNECTION ATTRIBUTES LOST WHEN CONNECTING WITHOUT DEFAULT DATABASE.

Version 5.1.45

- Fix for Bug#27131768, NULL POINTER EXCEPTION IN CONNECTION.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ doubt, this particular copy of the software is released
under the version 2 of the GNU General Public License.
MySQL Connector/J is brought to you by Oracle.

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

License information can be found in the COPYING file.

11 changes: 9 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0'?>
<!--
Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
@@ -158,7 +158,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=yes

<property name="major_version" value="5" />
<property name="minor_version" value="1" />
<property name="subminor_version" value="45" />
<property name="subminor_version" value="46" />
<property name="version_status" value="" />

<property name="version" value="${major_version}.${minor_version}.${subminor_version}${version_status}" />
@@ -618,6 +618,7 @@ Java 8 (for JDBC 4+ implementation) is also required. Set the full path to this

<!-- Build a distribution 'image' that doesn't include docs. -->
<target name="dist" description="Builds driver and binary .jar file, basically a distribution 'image' without docs." depends="init, compile">
<delete file="${buildDir}/${fullProdName}.jar" />
<delete file="${buildDir}/${fullProdName}-bin.jar" />

<mkdir dir="${buildDir}/META-INF" />
@@ -680,6 +681,12 @@ Java 8 (for JDBC 4+ implementation) is also required. Set the full path to this
value="${crypto-imports},${jdbc4-imports},${jee-imports},${jmx-imports},${integration-imports},${logging-imports},${fabric-imports}" />
</manifest>

<jar jarfile="${buildDir}/${fullProdName}/${fullProdName}.jar"
basedir="${compiler.output}"
includes="**/*.class,**/*.properties*,META-INF/**"
excludes="testsuite/**,demo/**"
index="true"
manifest="${buildDir}/${fullProdName}/META-INF/MANIFEST.MF" />
<jar jarfile="${buildDir}/${fullProdName}/${fullProdName}-bin.jar"
basedir="${compiler.output}"
includes="**/*.class,**/*.properties*,META-INF/**"
8 changes: 6 additions & 2 deletions src/com/mysql/jdbc/AuthenticationPlugin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
@@ -110,4 +110,8 @@ public interface AuthenticationPlugin extends Extension {
*/
boolean nextAuthenticationStep(Buffer fromServer, List<Buffer> toServer) throws SQLException;

}
/**
* Resets the authentication steps sequence.
*/
void reset();
}
69 changes: 27 additions & 42 deletions src/com/mysql/jdbc/ConnectionImpl.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
@@ -1277,8 +1277,10 @@ private void checkServerEncoding() throws SQLException {
* @throws SQLException
*/
private void checkTransactionIsolationLevel() throws SQLException {
String txIsolationName = versionMeetsMinimum(4, 0, 3) && !versionMeetsMinimum(8, 0, 3) ? "tx_isolation" : "transaction_isolation";
String s = this.serverVariables.get(txIsolationName);
String s = this.serverVariables.get("transaction_isolation");
if (s == null) {
s = this.serverVariables.get("tx_isolation");
}

if (s != null) {
Integer intTI = mapTransIsolationNameToValue.get(s);
@@ -2894,11 +2896,13 @@ private java.sql.DatabaseMetaData getMetaData(boolean checkClosed, boolean check
}

public java.sql.Statement getMetadataSafeStatement() throws SQLException {
return getMetadataSafeStatement(0);
}

public java.sql.Statement getMetadataSafeStatement(int maxRows) throws SQLException {
java.sql.Statement stmt = createStatement();

if (stmt.getMaxRows() != 0) {
stmt.setMaxRows(0);
}
stmt.setMaxRows(maxRows == -1 ? 0 : maxRows);

stmt.setEscapeProcessing(false);

@@ -2991,31 +2995,20 @@ public int getTransactionIsolation() throws SQLException {
java.sql.ResultSet rs = null;

try {
stmt = getMetadataSafeStatement();

String query = null;

int offset = 1;

if (versionMeetsMinimum(8, 0, 3)) {
query = "SELECT @@session.transaction_isolation";
} else if (versionMeetsMinimum(4, 0, 3)) {
query = "SELECT @@session.tx_isolation";
} else {
query = "SHOW VARIABLES LIKE 'transaction_isolation'";
offset = 2;
}

stmt = getMetadataSafeStatement(this.sessionMaxRows);
String query = versionMeetsMinimum(8, 0, 3) || (versionMeetsMinimum(5, 7, 20) && !versionMeetsMinimum(8, 0, 0))
? "SELECT @@session.transaction_isolation" : "SELECT @@session.tx_isolation";
rs = stmt.executeQuery(query);

if (rs.next()) {
String s = rs.getString(offset);
String s = rs.getString(1);

if (s != null) {
Integer intTI = mapTransIsolationNameToValue.get(s);

if (intTI != null) {
return intTI.intValue();
this.isolationLevel = intTI.intValue();
return this.isolationLevel;
}
}

@@ -3541,9 +3534,10 @@ public boolean isReadOnly(boolean useSessionStatus) throws SQLException {

try {
try {
stmt = getMetadataSafeStatement();
stmt = getMetadataSafeStatement(this.sessionMaxRows);

rs = stmt.executeQuery(versionMeetsMinimum(8, 0, 3) ? "select @@session.transaction_read_only" : "select @@session.tx_read_only");
rs = stmt.executeQuery(versionMeetsMinimum(8, 0, 3) || (versionMeetsMinimum(5, 7, 20) && !versionMeetsMinimum(8, 0, 0))
? "select @@session.transaction_read_only" : "select @@session.tx_read_only");
if (rs.next()) {
return rs.getInt(1) != 0; // mysql has a habit of tri+ state booleans
}
@@ -3753,6 +3747,9 @@ private void loadServerVariables() throws SQLException {

this.serverVariables = new HashMap<String, String>();

boolean currentJdbcComplTrunc = this.getJdbcCompliantTruncation();
setJdbcCompliantTruncation(false); // Temporarily disabling data truncation check avoids unnecessary SHOW WARNINGS on deprecated vars.

try {
if (versionMeetsMinimum(5, 1, 0)) {
StringBuilder queryBuf = new StringBuilder(versionComment).append("SELECT");
@@ -3772,19 +3769,17 @@ private void loadServerVariables() throws SQLException {
queryBuf.append(", @@max_allowed_packet AS max_allowed_packet");
queryBuf.append(", @@net_buffer_length AS net_buffer_length");
queryBuf.append(", @@net_write_timeout AS net_write_timeout");
if (versionMeetsMinimum(8, 0, 3)) {
queryBuf.append(", @@have_query_cache AS have_query_cache");
} else {
if (!versionMeetsMinimum(8, 0, 3)) {
queryBuf.append(", @@query_cache_size AS query_cache_size");
queryBuf.append(", @@query_cache_type AS query_cache_type");
}
queryBuf.append(", @@sql_mode AS sql_mode");
queryBuf.append(", @@system_time_zone AS system_time_zone");
queryBuf.append(", @@time_zone AS time_zone");
if (versionMeetsMinimum(8, 0, 3)) {
if (versionMeetsMinimum(8, 0, 3) || (versionMeetsMinimum(5, 7, 20) && !versionMeetsMinimum(8, 0, 0))) {
queryBuf.append(", @@transaction_isolation AS transaction_isolation");
} else {
queryBuf.append(", @@tx_isolation AS tx_isolation");
queryBuf.append(", @@tx_isolation AS transaction_isolation");
}
queryBuf.append(", @@wait_timeout AS wait_timeout");

@@ -3795,18 +3790,6 @@ private void loadServerVariables() throws SQLException {
this.serverVariables.put(rsmd.getColumnLabel(i), results.getString(i));
}
}

if (versionMeetsMinimum(8, 0, 3) && "YES".equalsIgnoreCase(this.serverVariables.get("have_query_cache"))) {
results.close();
results = stmt.executeQuery("SELECT @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type");
if (results.next()) {
ResultSetMetaData rsmd = results.getMetaData();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
this.serverVariables.put(rsmd.getColumnLabel(i), results.getString(i));
}
}
}

} else {
results = stmt.executeQuery(versionComment + "SHOW VARIABLES");
while (results.next()) {
@@ -3820,6 +3803,8 @@ private void loadServerVariables() throws SQLException {
if (ex.getErrorCode() != MysqlErrorNumbers.ER_MUST_CHANGE_PASSWORD || getDisconnectOnExpiredPasswords()) {
throw ex;
}
} finally {
setJdbcCompliantTruncation(currentJdbcComplTrunc);
}

if (getCacheServerConfiguration()) {
Loading