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.25
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.26
Choose a head ref
  • 17 commits
  • 25 files changed
  • 3 contributors

Commits on Apr 15, 2013

  1. dont allow updateRow() to be called when updatable cursor is position…

    …ed on insert row (Bug#45757)
    Jess Balint committed Apr 15, 2013
    Copy the full SHA
    a73b379 View commit details

Commits on Apr 17, 2013

  1. update CHANGES and copyright for bug#45757

    Jess Balint committed Apr 17, 2013
    Copy the full SHA
    afb45f7 View commit details

Commits on Apr 19, 2013

  1. Post-release changes.

    soklakov committed Apr 19, 2013
    Copy the full SHA
    989785c View commit details

Commits on May 13, 2013

  1. Copy the full SHA
    bbb18cf View commit details
  2. Fix for Bug#68307, return correct COLUMN_TYPE from both getProcedureC…

    …olumns() and getFunctionColumns().
    fjssilva committed May 13, 2013
    Copy the full SHA
    f1d4a54 View commit details

Commits on May 22, 2013

  1. Fix for Bug#42267, PreparedStatementWrapper doesn't have a toString()…

    … implementation
    Jess Balint committed May 22, 2013
    Copy the full SHA
    29fd71b View commit details
  2. merge

    Jess Balint committed May 22, 2013
    Copy the full SHA
    60fea02 View commit details
  3. Fix for Bug#42267, PreparedStatementWrapper doesn't have a toString()…

    … implementation
    Jess Balint committed May 22, 2013
    Copy the full SHA
    4139e29 View commit details

Commits on May 27, 2013

  1. Fix for Bug#44451, added missing fields in methods getColumns(), getP…

    …rocedureColumns(), getTables() and getUDTs(). Methods getClientInfoProperties() and getFunctions() were made available in all *DatabaseMetaDataUsingInfoSchema implementations.
    fjssilva committed May 27, 2013
    Copy the full SHA
    7bc5f81 View commit details

Commits on May 29, 2013

  1. Copy the full SHA
    14f9576 View commit details
  2. Fix for regression tests: reverted StringUtils.escapeQuote() removal,…

    … low-case names in testBug65871
    soklakov committed May 29, 2013
    Copy the full SHA
    ff22d6a View commit details

Commits on Jul 4, 2013

  1. Fix for Bug#68400, useCompression=true and connect to server, zip nat…

    …ive method cause out of memory.
    soklakov committed Jul 4, 2013
    Copy the full SHA
    a75e8cb View commit details

Commits on Jul 9, 2013

  1. Fix for Bug#69308: avoid calling close() method twice in PreparedStat…

    …ement and thus create and catch an exception unnecessarily.
    fjssilva committed Jul 9, 2013
    Copy the full SHA
    0b54521 View commit details
  2. Fix for Bug#69298: JDBC4 DatabaseMetaData.getProcedures() and getProc…

    …edureColumns() return metadata for stored procedures only or also functions, depending on connection property. Several fixes in Functions and Procedures metadata so that consulting I__S and MySQL/DDL returns same info.
    fjssilva committed Jul 9, 2013
    Copy the full SHA
    9cf80d6 View commit details

Commits on Jul 15, 2013

  1. fix ConnectionRegressionTest to work with JDK 6

    Jess Balint committed Jul 15, 2013
    Copy the full SHA
    ecb8fa5 View commit details

Commits on Jul 16, 2013

  1. Fix for Bug#69298: Connection property 'getProceduresReturnsFunctions…

    …' description updated.
    fjssilva committed Jul 16, 2013
    Copy the full SHA
    61a660d View commit details

Commits on Jul 22, 2013

  1. New version, 5.1.26

    soklakov committed Jul 22, 2013
    Copy the full SHA
    20891b5 View commit details
34 changes: 34 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog
# $Id$
08-05-13 - Version 5.1.26

- Fix for Bug#69298 (16845965), Methods DatabaseMetaData.getProcedures() and DatabaseMetaData.getProcedureColumns(), in JDBC4,
return stored procedure only or both stored procedures and functions metadata information, depending on the value set in the
connection property "getProceduresReturnsFunctions", having default value 'true'. Several fixes in Functions and
Procedures metadata so that consulting I__S and MySQL/DDL returns the same info.

- Fix for Bug#69308 (16879267), Avoid calling batchedStatement.close() twice, and thus raising and ignoring an undercover SQLException, in methods
PreparedStatement.executeBatchedInserts and PreparedStatement.executePreparedBatchAsMultiStatement.

- Fix for Bug#68400, useCompression=true and connect to server, zip native method cause out of memory.
CompressedInputStream now does not keep reference to connection.
Thank Dominic Tootell for his investigation, proposed solution and all the help he provided.

- Fix for Bug#65871, DatabaseMetaData.getColumns() throws an MySQLSyntaxErrorException.
Delimited names of databases and tables are handled correctly now. The edge case is ANSI quoted
identifiers with leading and trailing "`" symbols, for example CREATE DATABASE "`dbname`". Methods
like DatabaseMetaData.getColumns() allow parameters passed both in unquoted and quoted form,
quoted form is not JDBC-compliant but used by third party tools. So when you pass the indentifier
"`dbname`" in unquoted form (`dbname`) driver handles it as quoted by "`" symbol. To handle such
identifiers correctly a new behavior was added to pedantic mode (connection property pedantic=true),
now if it set to true methods like DatabaseMetaData.getColumns() treat all parameters as unquoted.

- Fix for Bug#45757 (11754192), Don't allow updateRow() to be called when updatable cursor is positioned on insert row.

- Fix for Bug#68098 (16224299), Return indexes sorted by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION in DatabaseMetaData.getIndexInfo.

- Fix for Bug#68307 (16707803), Return correct COLUMN_TYPE from both getProcedureColumns() and getFunctionColumns().

- Fix for Bug#42267, PreparedStatementWrapper doesn't have a toString() implementation

- Fix for Bug#44451 (11753081), Added missing fields in methods getColumns(), getProcedureColumns(), getTables() and getUDTs().
Methods getClientInfoProperties() and getFunctions() were made available in all *DatabaseMetaDataUsingInfoSchema implementations.

05-06-13 - Version 5.1.25

- Fix for Bug#68801, java webstart mysql-connector-java lib calls -bin library.
2 changes: 1 addition & 1 deletion 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="25"/>
<property name="subminor_version" value="26"/>
<property name="version_status" value=""/>

<property name="version" value="${major_version}.${minor_version}.${subminor_version}${version_status}"/>
74 changes: 34 additions & 40 deletions src/com/mysql/jdbc/CompressedInputStream.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2002, 2010, 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
@@ -31,6 +31,8 @@
import java.sql.SQLException;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import com.mysql.jdbc.log.Log;
import com.mysql.jdbc.log.NullLogger;

/**
* Used to de-compress packets from the MySQL server when protocol-level
@@ -45,15 +47,18 @@ class CompressedInputStream extends InputStream {
/** The packet data after it has been un-compressed */
private byte[] buffer;

/** The connection that is using us (used to read config values) */
private Connection connection;

/** The stream we are reading from the server */
private InputStream in;

/** The ZIP inflater used to un-compress packets */
private Inflater inflater;

/** Connection property reference */
private ConnectionPropertiesImpl.BooleanConnectionProperty traceProtocol;

/** Connection logger */
private Log log;

/**
* The buffer to read packet headers into
*/
@@ -71,7 +76,13 @@ class CompressedInputStream extends InputStream {
* @param streamFromServer
*/
public CompressedInputStream(Connection conn, InputStream streamFromServer) {
this.connection = conn;
this.traceProtocol = ((ConnectionPropertiesImpl)conn).traceProtocol;
try {
this.log = conn.getLog();
} catch (SQLException e) {
this.log = new NullLogger(null);
}

this.in = streamFromServer;
this.inflater = new Inflater();
}
@@ -93,7 +104,10 @@ public int available() throws IOException {
public void close() throws IOException {
this.in.close();
this.buffer = null;
this.inflater.end();
this.inflater = null;
this.traceProtocol = null;
this.log = null;
}

/**
@@ -120,16 +134,13 @@ private void getNextPacketFromServer() throws IOException {
+ (((this.packetHeaderBuffer[5] & 0xff)) << 8)
+ (((this.packetHeaderBuffer[6] & 0xff)) << 16);

if (this.connection.getTraceProtocol()) {
try {
this.connection.getLog().logTrace(
"Reading compressed packet of length "
+ compressedPacketLength + " uncompressed to "
+ uncompressedLength);
} catch (SQLException sqlEx) {
throw new IOException(sqlEx.toString()); // should never
// happen
}
boolean doTrace = this.traceProtocol.getValueAsBoolean();

if (doTrace) {
this.log.logTrace(
"Reading compressed packet of length "
+ compressedPacketLength + " uncompressed to "
+ uncompressedLength);
}

if (uncompressedLength > 0) {
@@ -156,16 +167,9 @@ private void getNextPacketFromServer() throws IOException {

this.inflater.end();
} else {
if (this.connection.getTraceProtocol()) {
try {
this.connection
.getLog()
.logTrace(
"Packet didn't meet compression threshold, not uncompressing...");
} catch (SQLException sqlEx) {
throw new IOException(sqlEx.toString()); // should never
// happen
}
if (doTrace) {
this.log.logTrace(
"Packet didn't meet compression threshold, not uncompressing...");
}

//
@@ -176,27 +180,17 @@ private void getNextPacketFromServer() throws IOException {
readFully(uncompressedData, 0, compressedPacketLength);
}

if (this.connection.getTraceProtocol()) {
try {
this.connection.getLog().logTrace(
if (doTrace) {
this.log.logTrace(
"Uncompressed packet: \n"
+ StringUtils.dumpAsHex(uncompressedData,
compressedPacketLength));
} catch (SQLException sqlEx) {
throw new IOException(sqlEx.toString()); // should never
// happen
}
}

if ((this.buffer != null) && (this.pos < this.buffer.length)) {
if (this.connection.getTraceProtocol()) {
try {
this.connection.getLog().logTrace(
"Combining remaining packet with new: ");
} catch (SQLException sqlEx) {
throw new IOException(sqlEx.toString()); // should never
// happen
}
if (doTrace) {
this.log.logTrace(
"Combining remaining packet with new: ");
}

int remaining = this.buffer.length - this.pos;
16 changes: 11 additions & 5 deletions src/com/mysql/jdbc/ConnectionImpl.java
Original file line number Diff line number Diff line change
@@ -1444,6 +1444,7 @@ public void abortInternal() throws SQLException {
} catch (Throwable t) {
// can't do anything about it, and we're forcibly aborting
}
this.io.releaseResources();
this.io = null;
}

@@ -1460,10 +1461,12 @@ public void abortInternal() throws SQLException {
*/
private void cleanup(Throwable whyCleanedUp) {
try {
if ((this.io != null) && !isClosed()) {
realClose(false, false, false, whyCleanedUp);
} else if (this.io != null) {
this.io.forceClose();
if (this.io != null) {
if (isClosed()) {
this.io.forceClose();
} else {
realClose(false, false, false, whyCleanedUp);
}
}
} catch (SQLException sqlEx) {
// ignore, we're going away.
@@ -4715,7 +4718,10 @@ public void realClose(boolean calledExplicitly, boolean issueRollback,
}
} finally {
this.openStatements = null;
this.io = null;
if (this.io != null) {
this.io.releaseResources();
this.io = null;
}
this.statementInterceptors = null;
this.exceptionInterceptor = null;
ProfilerEventHandlerFactory.removeInstance(this);
6 changes: 6 additions & 0 deletions src/com/mysql/jdbc/ConnectionProperties.java
Original file line number Diff line number Diff line change
@@ -1705,4 +1705,10 @@ public abstract void setJdbcCompliantTruncationForReads(
public abstract void setDisconnectOnExpiredPasswords(boolean disconnectOnExpiredPasswords);

public abstract boolean getDisconnectOnExpiredPasswords();

public abstract void setGetProceduresReturnsFunctions(boolean getProcedureReturnsFunctions);

public abstract boolean getGetProceduresReturnsFunctions();

String getConnectionAttributes() throws SQLException;
}
Loading