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.26
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.27
Choose a head ref

Commits on Jul 19, 2013

  1. change behavior of failed changeUser() call

    Jess Balint committed Jul 19, 2013
    Copy the full SHA
    72eb90c View commit details

Commits on Jul 22, 2013

  1. Post-release changes.

    soklakov committed Jul 22, 2013
    Copy the full SHA
    6e17898 View commit details

Commits on Jul 29, 2013

  1. merge

    Jess Balint committed Jul 29, 2013
    Copy the full SHA
    81c3720 View commit details

Commits on Jul 30, 2013

  1. Fix for Bug#50538, DatabaseMetaData.getDriverVersion() contains unexp…

    …anded ${bzr.revision-id}
    soklakov committed Jul 30, 2013
    Copy the full SHA
    d83b117 View commit details

Commits on Aug 21, 2013

  1. Fixed META-INF information

    soklakov committed Aug 21, 2013
    Copy the full SHA
    4e27d7e View commit details
  2. Copy the full SHA
    5540e41 View commit details

Commits on Sep 9, 2013

  1. Copy the full SHA
    79eb736 View commit details

Commits on Sep 11, 2013

  1. Copy the full SHA
    e89035d View commit details
  2. Copy the full SHA
    08e5673 View commit details
  3. Fix for Bug#17003626, REGRESSION TEST FAILURE WITH SERVER VERSION 5.7…

    ….1. In 5.7 server creation of more than one index on the same column will result in error, test cases fixed accordingly.
    soklakov committed Sep 11, 2013
    Copy the full SHA
    13b5287 View commit details
  4. Added support for multi-master replication topographies, which can no…

    …w be specified using the following host definition syntax:
    
    address=(host=hostname)(port=3306)(type=[master|slave])
    
    Fixed Bug#63354, allowing new connections when master is down if allowMasterDownConnections=true
    Todd Farmer committed Sep 11, 2013
    Copy the full SHA
    d4c2dda View commit details

Commits on Sep 12, 2013

  1. Fixed test case failures.

    tofarmer committed Sep 12, 2013
    Copy the full SHA
    3f0c289 View commit details

Commits on Sep 18, 2013

  1. Fix for Bug#69506, XAER_DUPID error code is not returned when a dupli…

    …cate XID is offered in Java.
    fjssilva committed Sep 18, 2013
    Copy the full SHA
    505ec23 View commit details

Commits on Sep 20, 2013

  1. Copy the full SHA
    1a868a2 View commit details

Commits on Sep 23, 2013

  1. Copy the full SHA
    a784788 View commit details
  2. Disable previous check.

    soklakov committed Sep 23, 2013
    Copy the full SHA
    424384e View commit details

Commits on Sep 26, 2013

  1. Copy the full SHA
    91da22b View commit details

Commits on Oct 9, 2013

  1. Copy the full SHA
    6c294e9 View commit details

Commits on Oct 10, 2013

  1. Fix broken ConnectionRegressionTest.testBug68733()

    Todd Farmer committed Oct 10, 2013
    Copy the full SHA
    f34340d View commit details
  2. Merge

    tofarmer committed Oct 10, 2013
    Copy the full SHA
    184ec4a View commit details

Commits on Oct 16, 2013

  1. Added tests for IPv6 connections and IPv6-capable INET_ATON and INET_…

    …NTOA functions compliance.
    fjssilva committed Oct 16, 2013
    Copy the full SHA
    9718051 View commit details
  2. Added minimum server version validation for IPv6-capable INET_ATON an…

    …d INET_NTOA functions compliance tests (related to bug#68454).
    fjssilva committed Oct 16, 2013
    Copy the full SHA
    5a65e91 View commit details
  3. Extended slow query warning with query execution plan for INSERT, REP…

    …LACE, UPDATE and DELETE.
    fjssilva committed Oct 16, 2013
    Copy the full SHA
    55f64d3 View commit details
  4. Copy the full SHA
    6d99c00 View commit details

Commits on Oct 17, 2013

  1. Copy the full SHA
    01034e0 View commit details

Commits on Oct 18, 2013

  1. Fix for Bug#68562, Combination rewriteBatchedStatements and useAffect…

    …edRows not working as expected.
    soklakov committed Oct 18, 2013
    Copy the full SHA
    ddfefd6 View commit details
  2. Copy the full SHA
    9a4d3ae View commit details
  3. DatabaseMetaData.getTableTypes() doesn't return the same table types …

    …as in DatabaseMetaData.getTables().
    
    Table types "SYSTEM TABLE" and "SYSTEM VIEW" were added and getTables() now returns SYSTEM table types for internal schemas "mysql", "information_schema" and "performance_schema". DatabaseMetaData.getTables() returns the same information either consulting or not Information_Schema.
    fjssilva committed Oct 18, 2013
    Copy the full SHA
    53bd2e2 View commit details
  4. Copy the full SHA
    b5cf26f View commit details

Commits on Oct 19, 2013

  1. Copy the full SHA
    c01d705 View commit details

Commits on Oct 21, 2013

  1. New version, 5.1.27

    soklakov committed Oct 21, 2013
    Copy the full SHA
    246d65a View commit details
Showing with 3,230 additions and 887 deletions.
  1. +52 −0 CHANGES
  2. +0 −53 README
  3. +25 −8 build.xml
  4. +15 −17 src/com/mysql/jdbc/Buffer.java
  5. +10 −3 src/com/mysql/jdbc/ConnectionImpl.java
  6. +56 −32 src/com/mysql/jdbc/ConnectionProperties.java
  7. +144 −102 src/com/mysql/jdbc/ConnectionPropertiesImpl.java
  8. +350 −190 src/com/mysql/jdbc/DatabaseMetaData.java
  9. +22 −26 src/com/mysql/jdbc/DatabaseMetaDataUsingInfoSchema.java
  10. +1 −1 src/com/mysql/jdbc/FailoverConnectionProxy.java
  11. +11 −0 src/com/mysql/jdbc/LoadBalancedConnection.java
  12. +63 −33 src/com/mysql/jdbc/LoadBalancedMySQLConnection.java
  13. +18 −4 src/com/mysql/jdbc/LoadBalancingConnectionProxy.java
  14. +7 −2 src/com/mysql/jdbc/LocalizedErrorMessages.properties
  15. +92 −45 src/com/mysql/jdbc/MysqlIO.java
  16. +50 −12 src/com/mysql/jdbc/NonRegisteringDriver.java
  17. +5 −6 src/com/mysql/jdbc/PreparedStatement.java
  18. +283 −46 src/com/mysql/jdbc/ReplicationConnection.java
  19. +177 −0 src/com/mysql/jdbc/ReplicationConnectionGroup.java
  20. +162 −0 src/com/mysql/jdbc/ReplicationConnectionGroupManager.java
  21. +4 −8 src/com/mysql/jdbc/ResultSetImpl.java
  22. +23 −3 src/com/mysql/jdbc/StringUtils.java
  23. +49 −32 src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java
  24. +1 −0 src/com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.java
  25. +65 −0 src/com/mysql/jdbc/jmx/ReplicationGroupManager.java
  26. +35 −0 src/com/mysql/jdbc/jmx/ReplicationGroupManagerMBean.java
  27. +2 −2 src/com/mysql/jdbc/util/BaseBugReport.java
  28. +0 −53 src/lib-nodist/README-commercial
  29. BIN src/{lib → lib-nodist}/ant-contrib.jar
  30. +77 −4 src/testsuite/BaseTestCase.java
  31. +501 −15 src/testsuite/regression/ConnectionRegressionTest.java
  32. +269 −54 src/testsuite/regression/MetaDataRegressionTest.java
  33. +39 −0 src/testsuite/regression/ResultSetRegressionTest.java
  34. +207 −6 src/testsuite/regression/StatementRegressionTest.java
  35. +141 −7 src/testsuite/regression/SyntaxRegressionTest.java
  36. +236 −123 src/testsuite/regression/jdbc4/MetaDataRegressionTest.java
  37. +38 −0 src/testsuite/simple/ConnectionTest.java
52 changes: 52 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# Changelog
# $Id$
11-04-13 - Version 5.1.27

- Fix for Bug#17248345, getFunctionColumns() method returns columns of procedure.

- Fix for Bug#69290 (16879239), JDBC Table type "SYSTEM TABLE" is used inconsistently.

- Fix for Bug#68562, Combination rewriteBatchedStatements and useAffectedRows not working as expected.

- Fix for Bug#69452 (17015673), memory size connection property doesn't support large values well.

- Added tests for InnoDB full-text search support introduced in 5.6GA.

- Extended slow query warning with query execution plan for INSERT, REPLACE, UPDATE and DELETE.

- Added tests for IPv6 functions introduced in 5.6GA.

- Added support of authentication data up to 2^64-1 bytes.

- Fix for Bug#38252, ResultSet.absolute(0) is not behaving according to JDBC specification.

- Fix for Bug#62469, JDBC Authentication Fails with Null Byte in Scramble

- Fix for Bug#69506, XAER_DUPID error code is not returned when a duplicate XID is offered in Java.

- Added support for multi-master replication topographies in ReplicationDriver. ReplicationDriver now uses two discrete load-balanced
connections, one each for master and slave connections. The same load-balancing options which apply to load-balanced connections
now also apply to ReplicationConnections. By default, this means that when a ReplicationConnection uses master connections
(because the read-only property of the Connection is false), work may be re-balanced between configured master hosts at transaction
boundaries. As with load-balanced connections, the ReplicationConnection host list may be managed within the JVM (see
com.mysql.jdbc.ReplicationConnectionGroupManager) or optionally via JMX (using replicationEnableJMX configuration option; see
com.mysql.jdbc.jmx.ReplicationGroupManagerMBean). To specify multi-master replication topographies, define each host "type"
property using the following format:

address=(host=hostname)(port=3306)(type=[master|slave])

In the absense of explicit type definitions, the driver will assume a single master listed first, with all subsequently-listed
hosts configured as slaves.

- Fix for Bug#63354 (16443992), JDBC cannot make new connections if master is down.

- Fix for Bug#17003626, REGRESSION TEST FAILURE WITH SERVER VERSION 5.7.1

- Removed ant-contrib.jar from C/J distribution.

- Added tests for GIS precise spatial operations introduced in 5.6GA.

- Fixed META-INF information

- Fix for Bug#17251955, ARRAYINDEXOUTOFBOUNDSEXCEPTION ON LONG MULTI-BYTE DB/USER NAMES

- Fix for Bug#50538, DatabaseMetaData.getDriverVersion() contains unexpanded ${bzr.revision-id}

08-05-13 - Version 5.1.26

- Fix for Bug#69298 (16845965), Methods DatabaseMetaData.getProcedures() and DatabaseMetaData.getProcedureColumns(), in JDBC4,
53 changes: 0 additions & 53 deletions README
Original file line number Diff line number Diff line change
@@ -63,59 +63,6 @@ Third-Party Component Notices

****************************************************************

%%The following software may be included in this product:
Ant-Contrib

Use of any of this software is governed by the terms of the license below:

* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2003 Ant-Contrib project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The name Ant-Contrib must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact
* ant-contrib-developers@lists.sourceforge.net.
*
* 5. Products derived from this software may not be called "Ant-Contrib"
* nor may "Ant-Contrib" appear in their names without prior written
* permission of the Ant-Contrib project.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================

*******************************************************************

%%The following software may be included in this product:
c3p0:JDBC DataSources/Resource Pools

33 changes: 25 additions & 8 deletions build.xml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@

<property name="major_version" value="5"/>
<property name="minor_version" value="1"/>
<property name="subminor_version" value="26"/>
<property name="subminor_version" value="27"/>
<property name="version_status" value=""/>

<property name="version" value="${major_version}.${minor_version}.${subminor_version}${version_status}"/>
@@ -87,7 +87,12 @@

<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${sourceDir}/lib/ant-contrib.jar"/>
<fileset dir="${sourceDir}/lib-nodist" erroronmissingdir="false">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${sourceDir}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>

@@ -167,17 +172,29 @@ and the full path to the rt.jar from Java-6 with the property &quot;com.mysql.jd

<exec dir="." executable="cmd" osfamily="windows"
output="${buildDir}/bzr.properties" failonerror="false"
failifexecutionfails="false">
failifexecutionfails="false"
resultproperty="bzrerror">
<arg line="/c bzr version-info" />
</exec>

<exec executable="bzr" osfamily="unix"
output="${buildDir}/bzr.properties" failonerror="false"
failifexecutionfails="false">
failifexecutionfails="false"
resultproperty="bzrerror">
<arg value="version-info" />
</exec>

<property prefix="bzr" file="${buildDir}/bzr.properties" />
<!-- We need the following workaround for the RE builds environment , which doesn't have access to bzr,
so bzr.properties file prepared in project root folder instead -->
<if>
<isset property="bzrerror"/>
<then>
<property prefix="bzr" file="./bzr.properties"/>
</then>
<else>
<property prefix="bzr" file="${buildDir}/bzr.properties"/>
</else>
</if>

<filterset id="versionFilterset">
<filter token="MYSQL_CJ_MAJOR_VERSION" value="${major_version}"/>
@@ -453,7 +470,7 @@ and the full path to the rt.jar from Java-6 with the property &quot;com.mysql.jd
<section name="common">
<attribute name="Specification-Title" value="JDBC" />
<attribute name="Specification-Version" value="4.0" />
<attribute name="Specification-Vendor" value="Sun Microsystems Inc." />
<attribute name="Specification-Vendor" value="Oracle Corporation" />
<attribute name="Implementation-Title" value="${prodDisplayName}" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Implementation-Vendor-Id" value="com.mysql" />
@@ -462,10 +479,10 @@ and the full path to the rt.jar from Java-6 with the property &quot;com.mysql.jd

<!-- OSGi -->

<attribute name="Bundle-Vendor" value="Sun Microsystems Inc." />
<attribute name="Bundle-Vendor" value="Oracle Corporation" />
<attribute name="Bundle-Classpath" value="." />
<attribute name="Bundle-Version" value="${osgid-version}" />
<attribute name="Bundle-Name" value="Sun Microsystems' JDBC Driver for MySQL" />
<attribute name="Bundle-Name" value="Oracle Corporation' JDBC Driver for MySQL" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-SymbolicName" value="com.mysql.jdbc" />
<attribute name="Export-Package" value="${driver-exports},${jee-exports},${logging-exports},${profiling-exports},${util-exports},${exceptions-exports},${jdbc4-exceptions-exports},${interceptors-exports},${integration-exports},${configs-exports},${legacy-exports}" />
32 changes: 15 additions & 17 deletions src/com/mysql/jdbc/Buffer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
@@ -435,6 +435,13 @@ public final String readString() {
return s;
}

/**
* Read string[NUL]
* @param encoding
* @param exceptionInterceptor
* @return
* @throws SQLException
*/
final String readString(String encoding, ExceptionInterceptor exceptionInterceptor) throws SQLException {
int i = this.position;
int len = 0;
@@ -456,30 +463,21 @@ final String readString(String encoding, ExceptionInterceptor exceptionIntercept
}

/**
* Read a fixed length string
* Read string[$len]
*/
final String readString(String encoding, ExceptionInterceptor exceptionInterceptor, int expectedLength) throws SQLException {
int i = this.position;
int len = 0;
int maxLen = getBufLength();

while ((i < maxLen) && (len < expectedLength) && (this.byteBuffer[i] != 0)) {
len++;
i++;
}

if (len < expectedLength) {
if (this.position + expectedLength > getBufLength()) {
throw SQLError.createSQLException(Messages.getString("ByteArrayBuffer.2"),
SQLError.SQL_STATE_ILLEGAL_ARGUMENT, exceptionInterceptor);
}

try {
return StringUtils.toString(this.byteBuffer, this.position, len, encoding);
return StringUtils.toString(this.byteBuffer, this.position, expectedLength, encoding);
} catch (UnsupportedEncodingException uEE) {
throw SQLError.createSQLException(Messages.getString("ByteArrayBuffer.1") //$NON-NLS-1$
+ encoding + "'", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, exceptionInterceptor); //$NON-NLS-1$
} finally {
this.position += len; // update cursor
this.position += expectedLength; // update cursor
}
}

@@ -666,14 +664,14 @@ final void writeLongLong(long i) throws SQLException {

// Write null-terminated string
final void writeString(String s) throws SQLException {
ensureCapacity((s.length() * 2) + 1);
ensureCapacity((s.length() * 3) + 1);
writeStringNoNull(s);
this.byteBuffer[this.position++] = 0;
}

// Write null-terminated string in the given encoding
final void writeString(String s, String encoding, MySQLConnection conn) throws SQLException {
ensureCapacity((s.length() * 2) + 1);
ensureCapacity((s.length() * 3) + 1);
try {
writeStringNoNull(s, encoding, encoding, false, conn);
} catch (UnsupportedEncodingException ue) {
@@ -686,7 +684,7 @@ final void writeString(String s, String encoding, MySQLConnection conn) throws S
// Write string, with no termination
final void writeStringNoNull(String s) throws SQLException {
int len = s.length();
ensureCapacity(len * 2);
ensureCapacity(len * 3);
System.arraycopy(StringUtils.getBytes(s), 0, this.byteBuffer, this.position, len);
this.position += len;

13 changes: 10 additions & 3 deletions src/com/mysql/jdbc/ConnectionImpl.java
Original file line number Diff line number Diff line change
@@ -1248,8 +1248,15 @@ public void changeUser(String userName, String newPassword)
if (newPassword == null) {
newPassword = "";
}

this.io.changeUser(userName, newPassword, this.database);

try {
this.io.changeUser(userName, newPassword, this.database);
} catch(SQLException ex) {
if (versionMeetsMinimum(5, 6, 13) && "28000".equals(ex.getSQLState())) {
cleanup(ex);
}
throw ex;
}
this.user = userName;
this.password = newPassword;

@@ -6090,8 +6097,8 @@ public void setNetworkTimeout(Executor executor, final int milliseconds) throws
executor.execute(new Runnable() {

public void run() {
setSocketTimeout(milliseconds); // for re-connects
try {
setSocketTimeout(milliseconds); // for re-connects
mysqlIo.setSocketTimeout(milliseconds);
} catch (SQLException e) {
throw new RuntimeException(e);
Loading