diff --git a/extra-libs-build.patch b/extra-libs-build.patch new file mode 100644 index 0000000..dae30b1 --- /dev/null +++ b/extra-libs-build.patch @@ -0,0 +1,66 @@ +Index: mysql-connector-java-5.1.35/build.xml +=================================================================== +--- mysql-connector-java-5.1.35.orig/build.xml ++++ mysql-connector-java-5.1.35/build.xml +@@ -449,7 +449,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + +@@ -457,7 +457,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + +@@ -465,7 +465,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + +@@ -473,7 +473,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + +@@ -481,7 +481,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + + + +@@ -500,7 +500,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + + + +@@ -773,6 +773,7 @@ Java 6 (for JDBC4+ implementation) is al + compiler="modern" + includeantruntime="false"> + ++ + + + diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100644 index 0000000..6b0e9e5 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +VERSION=$1 + +rm -rf mysql-connector-java-$VERSION + +tar xfz mysql-connector-java-$VERSION.tar.gz || exit 1 + +find mysql-connector-java-$VERSION -name '*.jar' -exec rm {} \; -o -name '*.zip' -exec rm {} \; + +tar cfJ mysql-connector-java-$VERSION-suse.tar.xz mysql-connector-java-$VERSION || exit 1 + +rm -rf mysql-connector-java-$VERSION + +exit 0 diff --git a/jdk6-check-use-jdk7.patch b/jdk6-check-use-jdk7.patch new file mode 100644 index 0000000..c31808b --- /dev/null +++ b/jdk6-check-use-jdk7.patch @@ -0,0 +1,16 @@ +Index: mysql-connector-java-5.1.35/build.xml +=================================================================== +--- mysql-connector-java-5.1.35.orig/build.xml ++++ mysql-connector-java-5.1.35/build.xml +@@ -267,10 +267,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- +- +- +- ++ + + + diff --git a/mysql-connector-java-5.1.25-suse.tar.xz b/mysql-connector-java-5.1.25-suse.tar.xz deleted file mode 100644 index 4cb0730..0000000 --- a/mysql-connector-java-5.1.25-suse.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37a31f6afea8ce3b4c382dd0b0e93b284bdbb3e9c7180919581c0fbfdf551260 -size 1336544 diff --git a/mysql-connector-java-5.1.35-suse.tar.xz b/mysql-connector-java-5.1.35-suse.tar.xz new file mode 100644 index 0000000..ebfdbfc --- /dev/null +++ b/mysql-connector-java-5.1.35-suse.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c2e0805b8e40d6b09b5dccfaf0f071d6e35470d7c392d019feddf885c1fe5d0 +size 1432996 diff --git a/mysql-connector-java-7-jdbc-4.1.patch b/mysql-connector-java-jdbc-4.1.patch similarity index 71% rename from mysql-connector-java-7-jdbc-4.1.patch rename to mysql-connector-java-jdbc-4.1.patch index 39e3731..7d0a0f0 100644 --- a/mysql-connector-java-7-jdbc-4.1.patch +++ b/mysql-connector-java-jdbc-4.1.patch @@ -1,8 +1,8 @@ -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/CallableStatement.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/CallableStatement.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/CallableStatement.java -@@ -31,11 +31,15 @@ import java.net.URL; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/CallableStatement.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java +@@ -32,11 +32,15 @@ import java.net.URL; import java.sql.Array; import java.sql.Blob; import java.sql.Clob; @@ -18,121 +18,120 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/CallableStatement.java import java.sql.Time; import java.sql.Timestamp; import java.sql.Types; -@@ -426,11 +430,11 @@ public class CallableStatement extends P - * @throws java.sql.SQLException If no object found that implements the interface - * @since 1.6 - */ -- public Object unwrap(Class iface) throws java.sql.SQLException { -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { - try { - // This works for classes that aren't actually wrapping - // anything -- return Util.cast(iface, this); -+ return iface.cast(this); - } catch (ClassCastException cce) { - throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), - SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); -@@ -2670,4 +2674,95 @@ public class CallableStatement extends P - } - } - } -+ +@@ -410,10 +414,10 @@ public class CallableStatement extends P + * If no object found that implements the interface + * @since 1.6 + */ +- public Object unwrap(Class iface) throws java.sql.SQLException { ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + try { + // This works for classes that aren't actually wrapping anything +- return Util.cast(iface, this); ++ return iface.cast(this); + } catch (ClassCastException cce) { + throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); + } +@@ -2450,4 +2454,95 @@ public class CallableStatement extends P + } + } + } ++ + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getCharacterStream(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public String getNString(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public String getNString(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public SQLXML getSQLXML(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public SQLXML getSQLXML(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public NClob getNClob (int parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public NClob getNClob (String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public RowId getRowId(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public RowId getRowId(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } + } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/ConnectionImpl.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/ConnectionImpl.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/ConnectionImpl.java -@@ -34,11 +34,16 @@ import java.nio.charset.Charset; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ConnectionImpl.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java +@@ -35,11 +35,16 @@ import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import java.sql.Blob; import java.sql.DatabaseMetaData; @@ -149,134 +148,122 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/ConnectionImpl.java import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; -@@ -6101,4 +6106,71 @@ public class ConnectionImpl extends Conn - return getSocketTimeout(); - } - } -+ +@@ -5565,4 +5570,71 @@ public class ConnectionImpl extends Conn + public void setProfilerEventHandlerInstance(ProfilerEventHandler h) { + this.eventSink = h; + } ++ + @Override + public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public String getClientInfo(String name) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public Properties getClientInfo() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClientInfo(String name, String value) + throws SQLClientInfoException { + //throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClientInfo(Properties properties) throws SQLClientInfoException { + //throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isValid(int timeout) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public SQLXML createSQLXML() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public NClob createNClob() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public Blob createBlob() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public Clob createClob() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ -+ @Override -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/DatabaseMetaData.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/DatabaseMetaData.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/DatabaseMetaData.java -@@ -30,6 +30,8 @@ import java.sql.ResultSet; - import java.sql.SQLException; - import java.sql.Statement; - import java.sql.Types; -+import java.sql.RowIdLifetime; -+import java.sql.SQLFeatureNotSupportedException; - import java.util.ArrayList; - import java.util.Collections; - import java.util.HashMap; -@@ -8540,4 +8542,37 @@ public class DatabaseMetaData implements - throws SQLException { - return true; - } -+ -+ @Override -+ public ResultSet getFunctions(String catalog, String schemaPattern, -+ String functionNamePattern) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public ResultSet getClientInfoProperties() -+ throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean autoCommitFailureClosesAllResultSets() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public RowIdLifetime getRowIdLifetime() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ ++ + @Override + public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } + } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/Driver.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/Driver.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/Driver.java -@@ -26,6 +26,8 @@ +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/DatabaseMetaData.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java +@@ -33,6 +33,8 @@ import java.sql.ResultSet; + import java.sql.SQLException; + import java.sql.Statement; + import java.sql.Types; ++import java.sql.RowIdLifetime; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.ArrayList; + import java.util.Arrays; + import java.util.Collections; +@@ -7869,4 +7871,25 @@ public class DatabaseMetaData implements + public boolean generatedKeyAlwaysReturned() throws SQLException { + return true; + } ++ ++ @Override ++ public boolean autoCommitFailureClosesAllResultSets() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public RowIdLifetime getRowIdLifetime() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/Driver.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java +@@ -24,6 +24,8 @@ package com.mysql.jdbc; import java.sql.SQLException; @@ -284,22 +271,687 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/Driver.java +import java.util.logging.Logger; /** - * The Java SQL framework allows for multiple database drivers. Each driver -@@ -78,4 +80,9 @@ public class Driver extends NonRegisteri - public Driver() throws SQLException { - // Required for Class.forName().newInstance() - } + * The Java SQL framework allows for multiple database drivers. Each driver should supply a class that implements the Driver interface +@@ -62,3 +64,8 @@ public class Driver extends NonRegisteri + // Required for Class.forName().newInstance() + } + } ++ ++ @Override ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4Connection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java +@@ -27,9 +27,11 @@ import java.sql.Blob; + import java.sql.Clob; + import java.sql.SQLClientInfoException; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.SQLXML; + import java.sql.NClob; + import java.sql.Struct; ++import java.util.concurrent.Executor; + import java.util.Properties; + import java.util.TimerTask; + +@@ -197,7 +199,8 @@ public class JDBC4Connection extends Con + /** + * @see java.sql.Connection#createClob() + */ +- public Clob createClob() { ++ @Override ++ public com.mysql.jdbc.Clob createClob() throws SQLException { + return new com.mysql.jdbc.Clob(getExceptionInterceptor()); + } + +@@ -233,4 +236,25 @@ public class JDBC4Connection extends Con + return this.infoProvider; + } + } ++ ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java +@@ -27,9 +27,11 @@ import java.sql.Blob; + import java.sql.Clob; + import java.sql.SQLClientInfoException; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.SQLXML; + import java.sql.NClob; + import java.sql.Struct; ++import java.util.concurrent.Executor; + import java.util.Properties; + import java.util.TimerTask; + +@@ -100,21 +102,24 @@ public class JDBC4LoadBalancedMySQLConne + /** + * @see java.sql.Connection#createBlob() + */ +- public Blob createBlob() { ++ @Override ++ public Blob createBlob() throws SQLException { + return this.getJDBC4Connection().createBlob(); + } + + /** + * @see java.sql.Connection#createClob() + */ +- public Clob createClob() { ++ @Override ++ public com.mysql.jdbc.Clob createClob() throws SQLException { + return this.getJDBC4Connection().createClob(); + } + + /** + * @see java.sql.Connection#createNClob() + */ +- public NClob createNClob() { ++ @Override ++ public NClob createNClob() throws SQLException { + return this.getJDBC4Connection().createNClob(); + } + +@@ -123,4 +128,25 @@ public class JDBC4LoadBalancedMySQLConne + return this.getJDBC4Connection().getClientInfoProviderImpl(); + } + } ++ ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MySQLConnection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4MySQLConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MySQLConnection.java +@@ -59,10 +59,13 @@ public interface JDBC4MySQLConnection ex + + public T unwrap(java.lang.Class iface) throws java.sql.SQLException; + +- public Blob createBlob(); ++ @Override ++ public Blob createBlob() throws SQLException; + +- public Clob createClob(); ++ @Override ++ public Clob createClob() throws SQLException; + +- public NClob createNClob(); ++ @Override ++ public NClob createNClob() throws SQLException; + + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MysqlParameterMetadata.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/MysqlParameterMetadata.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/MysqlParameterMetadata.java +@@ -25,6 +25,7 @@ package com.mysql.jdbc; + + import java.sql.ParameterMetaData; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.Types; + + public class MysqlParameterMetadata implements ParameterMetaData { +@@ -199,10 +200,10 @@ public class MysqlParameterMetadata impl + * If no object found that implements the interface + * @since 1.6 + */ +- public Object unwrap(Class iface) throws java.sql.SQLException { ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + try { + // This works for classes that aren't actually wrapping anything +- return Util.cast(iface, this); ++ return iface.cast(this); + } catch (ClassCastException cce) { + throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor); + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/NonRegisteringDriver.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/NonRegisteringDriver.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/NonRegisteringDriver.java +@@ -31,6 +31,7 @@ import java.lang.ref.ReferenceQueue; + import java.net.URLDecoder; + import java.sql.DriverPropertyInfo; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.List; +@@ -39,6 +40,9 @@ import java.util.Properties; + import java.util.StringTokenizer; + import java.util.concurrent.ConcurrentHashMap; + ++ ++import java.util.logging.Logger; ++ + /** + * The Java SQL framework allows for multiple database drivers. Each driver should supply a class that implements the Driver interface + * +@@ -904,4 +908,9 @@ public class NonRegisteringDriver implem + } + } + } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + throw new SQLFeatureNotSupportedException("Not supported"); + } } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java -@@ -35,8 +35,12 @@ import java.sql.Blob; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/PreparedStatement.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java +@@ -41,6 +41,7 @@ import java.nio.charset.Charset; + import java.nio.charset.CharsetEncoder; + import java.sql.Array; + import java.sql.Clob; ++import java.sql.NClob; + import java.sql.DatabaseMetaData; + import java.sql.Date; + import java.sql.ParameterMetaData; +@@ -49,6 +50,9 @@ import java.sql.SQLException; + import java.sql.Time; + import java.sql.Timestamp; + import java.sql.Types; ++import java.sql.SQLFeatureNotSupportedException; ++import java.sql.SQLXML; ++import java.sql.RowId; + import java.text.ParsePosition; + import java.text.SimpleDateFormat; + import java.util.ArrayList; +@@ -5166,4 +5170,20 @@ public class PreparedStatement extends c + return StringUtils.startsWithIgnoreCaseAndWs(sql, "INSERT", statementStartPos) + && StringUtils.indexOfIgnoreCase(statementStartPos, sql, "SELECT", "\"'`", "\"'`", StringUtils.SEARCH_MODE__MRK_COM_WS) == -1 && rewritableOdku; + } ++ ++ @Override ++ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{ ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setNClob(int parameterIndex, NClob value) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setRowId(int parameterIndex, RowId x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ReplicationConnection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ReplicationConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ReplicationConnection.java +@@ -23,6 +23,12 @@ + + package com.mysql.jdbc; + ++import java.sql.Blob; ++import java.sql.NClob; ++import java.sql.SQLXML; ++import java.sql.SQLFeatureNotSupportedException; ++import java.sql.SQLClientInfoException; ++import java.sql.Struct; + import java.sql.CallableStatement; + import java.sql.DatabaseMetaData; + import java.sql.PreparedStatement; +@@ -2972,6 +2978,69 @@ public class ReplicationConnection imple + getCurrentConnection().setSocksProxyHost(socksProxyHost); + } + ++ ++ @Override ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getClientInfo(String name) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Properties getClientInfo() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ } ++ ++ @Override ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ } ++ ++ @Override ++ public boolean isValid(int timeout) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML createSQLXML() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public NClob createNClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Blob createBlob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Clob createClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } + public String getSocksProxyHost() { + return getCurrentConnection().getSocksProxyHost(); + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetImpl.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ResultSetImpl.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetImpl.java +@@ -27,6 +27,7 @@ import java.io.ByteArrayInputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.ObjectInputStream; ++import java.io.Reader; + import java.io.StringReader; + import java.io.UnsupportedEncodingException; + import java.lang.reflect.Constructor; +@@ -36,9 +37,13 @@ import java.net.MalformedURLException; + import java.net.URL; + import java.sql.Array; + import java.sql.Date; ++import java.sql.NClob; + import java.sql.Ref; ++import java.sql.RowId; + import java.sql.SQLException; + import java.sql.SQLWarning; ++import java.sql.SQLFeatureNotSupportedException; ++import java.sql.SQLXML; + import java.sql.Time; + import java.sql.Timestamp; + import java.sql.Types; +@@ -7917,4 +7922,250 @@ public class ResultSetImpl implements Re + protected ExceptionInterceptor getExceptionInterceptor() { + return this.exceptionInterceptor; + } ++ ++ @Override ++ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNClob(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNClob(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateClob(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateClob(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBinaryStream(String columnLabel, java.io.InputStream x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateAsciiStream(String columnLabel, java.io.InputStream x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBinaryStream(int columnIndex, java.io.InputStream x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateAsciiStream(int columnIndex, java.io.InputStream x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBinaryStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateAsciiStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateBinaryStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateAsciiStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.io.Reader getNCharacterStream(String columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getNString(int columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getNString(String columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML getSQLXML(int columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML getSQLXML(String columnLabel) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public NClob getNClob(int columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public NClob getNClob(String columnLabel) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNClob(String columnLabel, NClob nClob) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNString(String columnLabel, String nString) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateNString(int columnLabel, String nString) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public int getHoldability() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateRowId(int columnIndex, RowId x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void updateRowId(String columnLabel, RowId x) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public RowId getRowId(int columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public RowId getRowId(String columnIndex) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ResultSetMetaData.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java +@@ -23,7 +23,9 @@ + + package com.mysql.jdbc; + ++import java.sql.NClob; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.Types; + + /** +@@ -832,12 +834,16 @@ public class ResultSetMetaData implement + * If no object found that implements the interface + * @since 1.6 + */ +- public Object unwrap(Class iface) throws java.sql.SQLException { ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + try { + // This works for classes that aren't actually wrapping anything +- return Util.cast(iface, this); ++ return iface.cast(this); + } catch (ClassCastException cce) { + throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor); + } + } ++ ++ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/StatementImpl.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/StatementImpl.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/StatementImpl.java +@@ -31,6 +31,8 @@ import java.sql.ResultSet; + import java.sql.SQLException; + import java.sql.SQLWarning; + import java.sql.Types; ++import java.sql.SQLFeatureNotSupportedException; ++import java.sql.*; + import java.util.ArrayList; + import java.util.Calendar; + import java.util.Collections; +@@ -2700,10 +2702,10 @@ public class StatementImpl implements St + * If no object found that implements the interface + * @since 1.6 + */ +- public Object unwrap(Class iface) throws java.sql.SQLException { ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + try { + // This works for classes that aren't actually wrapping anything +- return Util.cast(iface, this); ++ return iface.cast(this); + } catch (ClassCastException cce) { + throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java +@@ -33,8 +33,12 @@ import java.sql.Blob; import java.sql.CallableStatement; import java.sql.Clob; import java.sql.Date; @@ -312,181 +964,181 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/CallableSta import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; -@@ -2636,4 +2640,169 @@ public class CallableStatementWrapper ex - // throw SQLError.notImplemented(); - // } +@@ -2345,4 +2349,169 @@ public class CallableStatementWrapper ex + // throw SQLError.notImplemented(); + // } + @Override + public T getObject(int parameterIndex, Class type) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public T getObject(String parameterName, Class type) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setCharacterStream(String parameterName, java.io.Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBinaryStream(String parameterName, java.io.InputStream x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ ++ } ++ + @Override + public void setAsciiStream(String parameterName, java.io.InputStream x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setCharacterStream(String parameterName, java.io.Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBinaryStream(String parameterName, java.io.InputStream x, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setAsciiStream(String parameterName, java.io.InputStream x, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClob (String parameterName, Clob x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBlob (String parameterName, Blob x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getCharacterStream(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public String getNString(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public String getNString(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public SQLXML getSQLXML(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public SQLXML getSQLXML(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public NClob getNClob (String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public NClob getNClob (int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public RowId getRowId(String parameterName) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public RowId getRowId(int parameterIndex) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } + } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java -@@ -26,8 +26,15 @@ +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java +@@ -24,8 +24,15 @@ package com.mysql.jdbc.jdbc2.optional; import java.lang.reflect.Constructor; @@ -502,82 +1154,79 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/ConnectionW import java.sql.Statement; import java.util.Map; import java.util.Properties; -@@ -2834,4 +2841,68 @@ public class ConnectionWrapper extends W - return this.mc.getConnectionMutex(); - } - --} -\ No newline at end of file -+ @Override -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ @Override -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ //throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ //throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ +@@ -2836,4 +2843,67 @@ public class ConnectionWrapper extends W + public void setEnabledSSLCipherSuites(String cipherSuites) { + this.mc.setEnabledSSLCipherSuites(cipherSuites); + } ++ ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getClientInfo(String name) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Properties getClientInfo() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ @Override ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ //throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ //throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isValid(int timeout) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML createSQLXML() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + @Override + public Blob createBlob() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ -+ @Override -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } + -+} -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java ++ @Override ++ public NClob createNClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Clob createClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java -@@ -28,8 +28,10 @@ package com.mysql.jdbc.jdbc2.optional; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java +@@ -26,8 +26,10 @@ package com.mysql.jdbc.jdbc2.optional; import java.io.PrintWriter; import java.io.Serializable; import java.sql.SQLException; @@ -588,31 +1237,32 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSo import javax.naming.NamingException; import javax.naming.Reference; -@@ -450,4 +452,19 @@ public class MysqlDataSource extends Con - // public T unwrap(Class iface) throws SQLException { - // throw SQLError.notImplemented(); - // } +@@ -429,4 +431,20 @@ public class MysqlDataSource extends Con + // public T unwrap(Class iface) throws SQLException { + // throw SQLError.notImplemented(); + // } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } ++ } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java -@@ -27,6 +27,7 @@ package com.mysql.jdbc.jdbc2.optional; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java +@@ -26,6 +26,7 @@ package com.mysql.jdbc.jdbc2.optional; import java.lang.reflect.Constructor; import java.sql.Connection; import java.sql.SQLException; @@ -620,7 +1270,7 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlPooled import java.util.HashMap; import java.util.Iterator; import java.util.Map; -@@ -34,6 +35,7 @@ import java.util.Map; +@@ -33,6 +34,7 @@ import java.util.Map; import javax.sql.ConnectionEvent; import javax.sql.ConnectionEventListener; import javax.sql.PooledConnection; @@ -628,10 +1278,10 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlPooled import com.mysql.jdbc.ExceptionInterceptor; import com.mysql.jdbc.SQLError; -@@ -254,4 +256,13 @@ public class MysqlPooledConnection imple - protected ExceptionInterceptor getExceptionInterceptor() { - return this.exceptionInterceptor; - } +@@ -230,4 +232,13 @@ public class MysqlPooledConnection imple + protected ExceptionInterceptor getExceptionInterceptor() { + return this.exceptionInterceptor; + } -} \ No newline at end of file + @@ -644,11 +1294,11 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/MysqlPooled + } + +} -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java -@@ -34,12 +34,16 @@ import java.sql.Array; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java +@@ -32,12 +32,16 @@ import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Date; @@ -665,119 +1315,119 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/PreparedSta import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; -@@ -1224,4 +1228,107 @@ public class PreparedStatementWrapper ex - // public Object unwrap(Class arg0) throws SQLException { - // throw SQLError.notImplemented(); - // } +@@ -1091,4 +1095,107 @@ public class PreparedStatementWrapper ex + // public Object unwrap(Class arg0) throws SQLException { + // throw SQLError.notImplemented(); + // } + + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(int parameterName, NClob value) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(int parameterName, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNClob(int parameterName, Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setNString(int parameterIndex, String value) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } + } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java -@@ -29,6 +29,7 @@ import java.lang.reflect.Constructor; +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java +@@ -27,6 +27,7 @@ import java.lang.reflect.Constructor; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; @@ -785,893 +1435,52 @@ Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/jdbc2/optional/StatementWr import java.sql.SQLWarning; import java.sql.Statement; -@@ -866,4 +867,41 @@ public class StatementWrapper extends Wr - checkAndFireConnectionError(sqlEx); - } - } -+ +@@ -767,4 +768,40 @@ public class StatementWrapper extends Wr + checkAndFireConnectionError(sqlEx); + } + } ++ + @Override + public boolean isCloseOnCompletion() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void closeOnCompletion() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isPoolable() throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public void setPoolable(boolean poolable) throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isClosed() throws SQLException{ + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ ++ + @Override + public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } -+ -+ @Override -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } + -+ - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4Connection.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/JDBC4Connection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4Connection.java -@@ -28,9 +28,11 @@ import java.sql.Blob; - import java.sql.Clob; - import java.sql.SQLClientInfoException; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.sql.SQLXML; - import java.sql.NClob; - import java.sql.Struct; -+import java.util.concurrent.Executor; - import java.util.Properties; - import java.util.TimerTask; - -@@ -200,7 +202,8 @@ public class JDBC4Connection extends Con - /** - * @see java.sql.Connection#createClob() - */ -- public Clob createClob() { -+ @Override -+ public com.mysql.jdbc.Clob createClob() throws SQLException { - return new com.mysql.jdbc.Clob(getExceptionInterceptor()); - } - -@@ -238,4 +241,25 @@ public class JDBC4Connection extends Con - return this.infoProvider; - } - } -+ -+ public int getNetworkTimeout() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void setNetworkTimeout(Executor executor, int millis) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void abort(Executor executor) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public String getSchema() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void setSchema(String schema) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java -@@ -29,9 +29,11 @@ import java.sql.Blob; - import java.sql.Clob; - import java.sql.SQLClientInfoException; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.sql.SQLXML; - import java.sql.NClob; - import java.sql.Struct; -+import java.util.concurrent.Executor; - import java.util.Properties; - import java.util.TimerTask; - -@@ -109,21 +111,24 @@ public class JDBC4LoadBalancedMySQLConne - /** - * @see java.sql.Connection#createBlob() - */ -- public Blob createBlob() { -+ @Override -+ public Blob createBlob() throws SQLException { - return this.getJDBC4Connection().createBlob(); - } - - /** - * @see java.sql.Connection#createClob() - */ -- public Clob createClob() { -+ @Override -+ public Clob createClob() throws SQLException { - return this.getJDBC4Connection().createClob(); - } - - /** - * @see java.sql.Connection#createNClob() - */ -- public NClob createNClob() { -+ @Override -+ public NClob createNClob() throws SQLException { - return this.getJDBC4Connection().createNClob(); - } - -@@ -133,6 +138,26 @@ public class JDBC4LoadBalancedMySQLConne - } - - } -+ -+ public int getNetworkTimeout() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void setNetworkTimeout(Executor executor, int millis) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void abort(Executor executor) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public String getSchema() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ public void setSchema(String schema) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } - - - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4MySQLConnection.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/JDBC4MySQLConnection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/JDBC4MySQLConnection.java -@@ -63,11 +63,14 @@ public interface JDBC4MySQLConnection ex - - public T unwrap(java.lang.Class iface) throws java.sql.SQLException; - -- public Blob createBlob(); -+ @Override -+ public Blob createBlob() throws SQLException; - -- public Clob createClob(); -+ @Override -+ public Clob createClob() throws SQLException; - -- public NClob createNClob(); -+ @Override -+ public NClob createNClob() throws SQLException; - - - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/LoadBalancedMySQLConnection.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/LoadBalancedMySQLConnection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/LoadBalancedMySQLConnection.java -@@ -29,6 +29,14 @@ import java.sql.SQLException; - import java.sql.SQLWarning; - import java.sql.Savepoint; - import java.sql.Statement; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLClientInfoException; -+import java.sql.Struct; -+import java.sql.Array; -+import java.sql.Blob; -+import java.sql.Clob; -+import java.sql.NClob; -+import java.sql.SQLXML; - import java.util.Calendar; - import java.util.List; - import java.util.Map; -@@ -2553,34 +2561,34 @@ public class LoadBalancedMySQLConnection - getActiveMySQLConnection().setIncludeThreadNamesAsStatementComment(flag); - } - -- public boolean isServerLocal() throws SQLException { -- return getActiveMySQLConnection().isServerLocal(); -- } -- -- public void setAuthenticationPlugins(String authenticationPlugins) { -- getActiveMySQLConnection().setAuthenticationPlugins(authenticationPlugins); -- } -- -- public String getAuthenticationPlugins() { -- return getActiveMySQLConnection().getAuthenticationPlugins(); -- } -- -- public void setDisabledAuthenticationPlugins( -- String disabledAuthenticationPlugins) { -- getActiveMySQLConnection().setDisabledAuthenticationPlugins(disabledAuthenticationPlugins); -- } -- -- public String getDisabledAuthenticationPlugins() { -- return getActiveMySQLConnection().getDisabledAuthenticationPlugins(); -- } -- -- public void setDefaultAuthenticationPlugin( -- String defaultAuthenticationPlugin) { -- getActiveMySQLConnection().setDefaultAuthenticationPlugin(defaultAuthenticationPlugin); -- } -- -- public String getDefaultAuthenticationPlugin() { -- return getActiveMySQLConnection().getDefaultAuthenticationPlugin(); -+ public boolean isServerLocal() throws SQLException { -+ return getActiveMySQLConnection().isServerLocal(); -+ } -+ -+ public void setAuthenticationPlugins(String authenticationPlugins) { -+ getActiveMySQLConnection().setAuthenticationPlugins(authenticationPlugins); -+ } -+ -+ public String getAuthenticationPlugins() { -+ return getActiveMySQLConnection().getAuthenticationPlugins(); -+ } -+ -+ public void setDisabledAuthenticationPlugins( -+ String disabledAuthenticationPlugins) { -+ getActiveMySQLConnection().setDisabledAuthenticationPlugins(disabledAuthenticationPlugins); -+ } -+ -+ public String getDisabledAuthenticationPlugins() { -+ return getActiveMySQLConnection().getDisabledAuthenticationPlugins(); -+ } -+ -+ public void setDefaultAuthenticationPlugin( -+ String defaultAuthenticationPlugin) { -+ getActiveMySQLConnection().setDefaultAuthenticationPlugin(defaultAuthenticationPlugin); -+ } -+ -+ public String getDefaultAuthenticationPlugin() { -+ return getActiveMySQLConnection().getDefaultAuthenticationPlugin(); - } - - public void setParseInfoCacheFactory(String factoryClassname) { -@@ -2635,4 +2643,66 @@ public class LoadBalancedMySQLConnection - public String getConnectionAttributes() throws SQLException { - return getActiveMySQLConnection().getConnectionAttributes(); - } -+ -+ @Override -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ @Override -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ } -+ -+ @Override -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ } -+ @Override -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/MysqlParameterMetadata.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/MysqlParameterMetadata.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/MysqlParameterMetadata.java -@@ -26,6 +26,7 @@ package com.mysql.jdbc; - - import java.sql.ParameterMetaData; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.sql.Types; - - public class MysqlParameterMetadata implements ParameterMetaData { -@@ -202,11 +203,11 @@ public class MysqlParameterMetadata impl - * @throws java.sql.SQLException If no object found that implements the interface - * @since 1.6 - */ -- public Object unwrap(Class iface) throws java.sql.SQLException { -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { - try { - // This works for classes that aren't actually wrapping - // anything -- return Util.cast(iface, this); -+ return iface.cast(this); - } catch (ClassCastException cce) { - throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), - SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor); -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/NonRegisteringDriver.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/NonRegisteringDriver.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/NonRegisteringDriver.java -@@ -33,6 +33,7 @@ import java.lang.ref.ReferenceQueue; - import java.net.URLDecoder; - import java.sql.DriverPropertyInfo; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.util.ArrayList; - import java.util.Iterator; - import java.util.List; -@@ -40,6 +41,9 @@ import java.util.Locale; - import java.util.Properties; - import java.util.StringTokenizer; - import java.util.concurrent.ConcurrentHashMap; -+ -+import java.util.logging.Logger; -+ - /** - * The Java SQL framework allows for multiple database drivers. Each driver - * should supply a class that implements the Driver interface -@@ -966,4 +970,9 @@ public class NonRegisteringDriver implem - } - } - } -+ -+ @Override -+ public Logger getParentLogger() throws SQLFeatureNotSupportedException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/PreparedStatement.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/PreparedStatement.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/PreparedStatement.java -@@ -40,6 +40,7 @@ import java.nio.charset.Charset; - import java.nio.charset.CharsetEncoder; - import java.sql.Array; - import java.sql.Clob; -+import java.sql.NClob; - import java.sql.DatabaseMetaData; - import java.sql.Date; - import java.sql.ParameterMetaData; -@@ -48,6 +49,9 @@ import java.sql.SQLException; - import java.sql.Time; - import java.sql.Timestamp; - import java.sql.Types; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLXML; -+import java.sql.RowId; - import java.text.ParsePosition; - import java.text.SimpleDateFormat; - import java.util.ArrayList; -@@ -5757,4 +5761,20 @@ public class PreparedStatement extends c - statementStartPos, sql, "SELECT", "\"'`", - "\"'`", false) == -1 && rewritableOdku; - } -+ -+ @Override -+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{ -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void setNClob(int parameterIndex, NClob value) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void setRowId(int parameterIndex, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/ReplicationConnection.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/ReplicationConnection.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/ReplicationConnection.java -@@ -21,6 +21,12 @@ - */ - package com.mysql.jdbc; - -+import java.sql.Blob; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLClientInfoException; -+import java.sql.Struct; - import java.sql.CallableStatement; - import java.sql.DatabaseMetaData; - import java.sql.PreparedStatement; -@@ -2695,4 +2701,67 @@ public class ReplicationConnection imple - public Object getConnectionMutex() { - return getCurrentConnection().getConnectionMutex(); - } -+ -+ @Override -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ } -+ -+ @Override -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ } -+ -+ @Override -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/ResultSetImpl.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/ResultSetImpl.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/ResultSetImpl.java -@@ -29,6 +29,7 @@ import java.io.ByteArrayInputStream; - import java.io.IOException; - import java.io.InputStream; - import java.io.ObjectInputStream; -+import java.io.Reader; - import java.io.StringReader; - import java.io.UnsupportedEncodingException; - import java.lang.reflect.Constructor; -@@ -38,9 +39,13 @@ import java.net.MalformedURLException; - import java.net.URL; - import java.sql.Array; - import java.sql.Date; -+import java.sql.NClob; - import java.sql.Ref; -+import java.sql.RowId; - import java.sql.SQLException; - import java.sql.SQLWarning; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLXML; - import java.sql.Time; - import java.sql.Timestamp; - import java.sql.Types; -@@ -8747,4 +8752,258 @@ public class ResultSetImpl implements Re - protected ExceptionInterceptor getExceptionInterceptor() { - return this.exceptionInterceptor; - } -+ -+ @Override -+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNClob(String columnLabel, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNClob(int columnIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateClob(int columnIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateClob(String columnLabel, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBinaryStream(String columnLabel, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateAsciiStream(String columnLabel, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBinaryStream(int columnIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ -+ @Override -+ public void updateAsciiStream(int columnIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ -+ @Override -+ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBinaryStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateAsciiStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateBinaryStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ -+ @Override -+ public void updateAsciiStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public java.io.Reader getNCharacterStream(String columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public String getNString(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public String getNString(String columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public SQLXML getSQLXML(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public SQLXML getSQLXML(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public NClob getNClob(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public NClob getNClob(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNClob(String columnLabel, NClob nClob) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNString(String columnLabel, String nString) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateNString(int columnLabel, String nString) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isClosed() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public int getHoldability() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateRowId(int columnIndex, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public void updateRowId(String columnLabel, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public RowId getRowId(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public RowId getRowId(String columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ + @Override + public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } + } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/ResultSetMetaData.java +Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionTest.java =================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/ResultSetMetaData.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/ResultSetMetaData.java -@@ -23,7 +23,9 @@ - */ - package com.mysql.jdbc; - -+import java.sql.NClob; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.sql.Types; - - /** -@@ -849,14 +851,18 @@ public class ResultSetMetaData implement - * @throws java.sql.SQLException If no object found that implements the interface - * @since 1.6 - */ -- public Object unwrap(Class iface) throws java.sql.SQLException { -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { - try { - // This works for classes that aren't actually wrapping - // anything -- return Util.cast(iface, this); -+ return iface.cast(this); - } catch (ClassCastException cce) { - throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), - SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor); - } - } -+ -+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } - } -Index: mysql-connector-java-5.1.25/src/com/mysql/jdbc/StatementImpl.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/com/mysql/jdbc/StatementImpl.java -+++ mysql-connector-java-5.1.25/src/com/mysql/jdbc/StatementImpl.java -@@ -29,6 +29,8 @@ import java.sql.ResultSet; - import java.sql.SQLException; - import java.sql.SQLWarning; - import java.sql.Types; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.*; - import java.util.ArrayList; - import java.util.Calendar; - import java.util.Collections; -@@ -2971,16 +2973,16 @@ public class StatementImpl implements St - * @throws java.sql.SQLException If no object found that implements the interface - * @since 1.6 - */ -- public Object unwrap(Class iface) throws java.sql.SQLException { -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { - try { - // This works for classes that aren't actually wrapping - // anything -- return Util.cast(iface, this); -+ return iface.cast(this); - } catch (ClassCastException cce) { - throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), - SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); - } -- } -+ } - - protected int findStartOfStatement(String sql) { - int statementStartPos = 0; -@@ -3051,4 +3053,4 @@ public class StatementImpl implements St - return closeOnCompletion; - } - } --} -\ No newline at end of file -+} -Index: mysql-connector-java-5.1.25/src/testsuite/regression/StatementRegressionTest.java -=================================================================== ---- mysql-connector-java-5.1.25.orig/src/testsuite/regression/StatementRegressionTest.java -+++ mysql-connector-java-5.1.25/src/testsuite/regression/StatementRegressionTest.java -@@ -55,6 +55,11 @@ import java.sql.Ref; +--- mysql-connector-java-5.1.35.orig/src/testsuite/regression/StatementRegressionTest.java ++++ mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionTest.java +@@ -52,6 +52,11 @@ import java.sql.Ref; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; @@ -1683,20 +1492,20 @@ Index: mysql-connector-java-5.1.25/src/testsuite/regression/StatementRegressionT import java.sql.SQLWarning; import java.sql.Statement; import java.sql.Time; -@@ -2542,7 +2547,8 @@ public class StatementRegressionTest ext - try { - pStmt = this.conn - .prepareStatement("INSERT INTO testNullClob VALUES (?)"); -- pStmt.setClob(1, null); -+ Clob x = null; -+ pStmt.setClob(1, x); - pStmt.executeUpdate(); - } finally { - if (pStmt != null) { -@@ -5272,6 +5278,276 @@ public class StatementRegressionTest ext - public int getBytesSize() throws SQLException { - return 0; - } +@@ -2320,7 +2325,8 @@ public class StatementRegressionTest ext + + try { + pStmt = this.conn.prepareStatement("INSERT INTO testNullClob VALUES (?)"); +- pStmt.setClob(1, null); ++ Clob x = null; ++ pStmt.setClob(1, x); + pStmt.executeUpdate(); + } finally { + if (pStmt != null) { +@@ -5277,6 +5283,271 @@ public class StatementRegressionTest ext + + Connection conn1 = null; + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); @@ -1929,11 +1738,6 @@ Index: mysql-connector-java-5.1.25/src/testsuite/regression/StatementRegressionT + } + + @Override -+ public boolean isClosed() throws SQLException { -+ throw new SQLFeatureNotSupportedException("Not supported"); -+ } -+ -+ @Override + public int getHoldability() throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } @@ -1967,12 +1771,284 @@ Index: mysql-connector-java-5.1.25/src/testsuite/regression/StatementRegressionT + public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); + } - }; - } + try { + assertEquals(1, this.stmt.executeUpdate("INSERT INTO bug43196 (a) VALUES (1)", Statement.RETURN_GENERATED_KEYS)); -@@ -6906,4 +7182,5 @@ public class StatementRegressionTest ext +@@ -6911,6 +7182,7 @@ public class StatementRegressionTest ext + expectedUpdCountBatchPStmt = expectedUpdCountBatchPStmtRW; + expectedGenKeysBatchPStmt = versionMeetsMinimum(5, 5) ? expectedGenKeysForBatchPStmtRW : expectedGenKeysForBatchPStmtRW51; + break; ++ + case 4: + // dontCheckOnDuplicateKeyUpdateInSQL=true is canceled by rewriteBatchedStatements=true + testConn = getConnectionWithProps("rewriteBatchedStatements=true,dontCheckOnDuplicateKeyUpdateInSQL=true"); +Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java ++++ mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java +@@ -23,13 +23,20 @@ - } + package com.mysql.fabric.jdbc; ++import java.sql.Blob; ++import java.sql.Clob; ++import java.sql.NClob; ++import java.sql.SQLXML; + import java.sql.CallableStatement; + import java.sql.DatabaseMetaData; + import java.sql.PreparedStatement; + import java.sql.SQLException; ++import java.sql.SQLClientInfoException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.SQLWarning; + import java.sql.Savepoint; + import java.sql.Statement; ++import java.sql.Struct; + import java.util.ArrayList; + import java.util.Calendar; + import java.util.HashMap; +@@ -844,22 +851,6 @@ public class FabricMySQLConnectionProxy + return getActiveMySQLConnection().getMetadataSafeStatement(); + } + +- /** +- * Methods doing essentially nothing +- * +- * @param iface +- */ +- public boolean isWrapperFor(Class iface) { +- return false; +- } +- +- /** +- * @param iface +- */ +- public T unwrap(Class iface) { +- return null; +- } +- + public void unSafeStatementInterceptors() throws SQLException { + } + +@@ -2891,14 +2882,6 @@ public class FabricMySQLConnectionProxy + public void clearWarnings() { + } + +- public Properties getClientInfo() { +- return null; +- } +- +- public String getClientInfo(String name) { +- return null; +- } +- + public int getHoldability() { + return -1; + } +@@ -2928,4 +2911,64 @@ public class FabricMySQLConnectionProxy + + public void decachePreparedStatement(ServerPreparedStatement pstmt) throws SQLException { + } ++ ++ @Override ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getClientInfo(String name) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Properties getClientInfo() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ @Override ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ //throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ //throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML createSQLXML() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public NClob createNClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Blob createBlob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Clob createClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/MultiHostMySQLConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.java +@@ -23,6 +23,12 @@ + + package com.mysql.jdbc; + ++import java.sql.Blob; ++import java.sql.NClob; ++import java.sql.SQLXML; ++import java.sql.SQLFeatureNotSupportedException; ++import java.sql.SQLClientInfoException; ++import java.sql.Struct; + import java.sql.CallableStatement; + import java.sql.DatabaseMetaData; + import java.sql.PreparedStatement; +@@ -2411,4 +2417,67 @@ public class MultiHostMySQLConnection im + public void setEnabledSSLCipherSuites(String cipherSuites) { + getActiveMySQLConnection().setEnabledSSLCipherSuites(cipherSuites); + } ++ ++ @Override ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public String getClientInfo(String name) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Properties getClientInfo() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ } ++ ++ @Override ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ } ++ ++ @Override ++ public boolean isValid(int timeout) throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public SQLXML createSQLXML() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public NClob createNClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Blob createBlob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public Clob createClob() throws SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } ++ ++ @Override ++ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } + } +Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java ++++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java +@@ -102,21 +102,24 @@ public class JDBC4MultiHostMySQLConnecti + /** + * @see java.sql.Connection#createBlob() + */ +- public Blob createBlob() { ++ @Override ++ public Blob createBlob() throws SQLException { + return this.getJDBC4Connection().createBlob(); + } + + /** + * @see java.sql.Connection#createClob() + */ +- public Clob createClob() { ++ @Override ++ public com.mysql.jdbc.Clob createClob() throws SQLException { + return this.getJDBC4Connection().createClob(); + } + + /** + * @see java.sql.Connection#createNClob() + */ +- public NClob createNClob() { ++ @Override ++ public NClob createNClob() throws SQLException { + return this.getJDBC4Connection().createNClob(); + } + +Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java +=================================================================== +--- mysql-connector-java-5.1.35.orig/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java ++++ mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java +@@ -28,6 +28,7 @@ import java.sql.Connection; + import java.sql.Driver; + import java.sql.DriverManager; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.Properties; + import java.util.logging.Logger; + +@@ -103,7 +104,9 @@ public class FabricMySQLDriver extends N + return super.parseURL(url.replaceAll("fabric:", ""), defaults); + } + +- public Logger getParentLogger() throws SQLException { +- throw new SQLException("no logging"); +- } ++ @Override ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException("Not supported"); ++ } + } diff --git a/mysql-connector-java.changes b/mysql-connector-java.changes index 0788229..3a137cb 100644 --- a/mysql-connector-java.changes +++ b/mysql-connector-java.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Tue Apr 21 15:22:44 UTC 2015 - tchvatal@suse.com + +- Update to 5.1.35 (see CHANGES for full list of issues) + bnc#927981 CVE-2015-2575: + * http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html +- Remove not applicable patch: + * mysql-connector-java-7-jdbc-4.1.patch +- Do not explicitely check for jdk6 but be happy with 7 and 8: + * jdk6-check-use-jdk7.patch +- Do not require hibernate4 to actually build: + * extra-libs-build.patch +- Do not build jdk5 depending jdbc3: + * no-jdk5-requirement.patch +- Add and rebase jdbc4.1 patch: + * mysql-connector-java-jdbc-4.1.patch +- Add new patch to build tests: + * use-classpath-in-tests.patch + ------------------------------------------------------------------- Wed Mar 18 09:46:18 UTC 2015 - tchvatal@suse.com diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index 68fed97..0416ddc 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -17,32 +17,33 @@ Name: mysql-connector-java -Version: 5.1.25 +Version: 5.1.35 Release: 0 Summary: Official JDBC Driver for MySQL License: GPL-2.0+ Group: Development/Libraries/Java -Url: http://www.mysql.com/downloads/api-jdbc-stable.html -# url-for-download: http://dev.mysql.com/get/Downloads/Connector-J/%{name}-%{version}.zip/from/pick#mirrors -# docs are now under very strict proprietary license by Oracle, so lets not distribute them -# remove bundled jars as well -# tar -xf %{name}-%{version}.tar.gz -# rm -rf %{name}-%{version}/docs -# find %{name}-%{version} -name '*jar' -delete -# tar -xJf %{name}-%{version}-suse.tar.xz +Url: http://dev.mysql.com/downloads/connector/j/ Source0: %{name}-%{version}-suse.tar.xz -# Patch to build Java 7/jdbc 4.1 -Patch0: mysql-connector-java-7-jdbc-4.1.patch +# Script to repack upstream tarball +# ./generate-tarball.sh VERSION +Source99: generate-tarball.sh +# PATCH-FIX-UPSTREAM: do not strictly require jdk6 to compile +Patch0: jdk6-check-use-jdk7.patch +# PATCH-FIX-UPSTREAM: do not require hibernate4 to actually just build +Patch1: extra-libs-build.patch +# PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java +Patch2: no-jdk5-requirement.patch +# PATCH-FIX-UPSTREAM: build with jdbc4.1 and also with new javac +Patch3: mysql-connector-java-jdbc-4.1.patch +# PATCH-FIX-UPSTREAM: do not lose classpath during tests build +Patch4: use-classpath-in-tests.patch BuildRequires: ant BuildRequires: ant-contrib BuildRequires: apache-commons-logging -#BuildRequires: jta >= 1.0 BuildRequires: geronimo-jta-1_1-api -#BuildRequires: java-1_5_0-gcj-compat-devel BuildRequires: java-devel >= 1.6.0 BuildRequires: javapackages-tools BuildRequires: junit -#!BuildIgnore: maven2-bootstrap BuildRequires: log4j-mini BuildRequires: slf4j BuildRequires: xz @@ -69,6 +70,10 @@ set that supports the capabilities of MySQL. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 # dup rm -f README @@ -76,13 +81,15 @@ rm -f README sed -i -e 's/.$//' README.txt %build - # disable jboss integration rm -rf src/com/mysql/jdbc/integration/jboss rm src/testsuite/regression/ConnectionRegressionTest.java rm src/testsuite/regression/DataSourceRegressionTest.java rm src/testsuite/simple/ReadOnlyCallableStatementTest.java rm src/testsuite/simple/jdbc4/StatementsTest.java +# disable hibernate4 integration +rm -rf src/com/mysql/fabric/hibernate +rm -rf src/demo export CLASSPATH=$(build-classpath \ ant-contrib \ @@ -92,17 +99,12 @@ export CLASSPATH=$(build-classpath \ jta \ junit \ log4j) - -# we need jdk5 for jdbc3.0 -# XXX: JAVA_HOME must be setup **after** CLASSPATH -#export JAVA_HOME=%{_libdir}/jvm/java-1.5.0-gcj ant \ -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \ -DbuildDir=build-mysql-jdbc \ -DdistDir=dist-mysql-jdbc \ - -Dcom.mysql.jdbc.java6.javac="%{javac}" \ - -Dcom.mysql.jdbc.java6.java="%{java}" \ - -Dcom.mysql.jdbc.java6.rtjar"=%{java_home}/jre/lib/rt.jar" + -Dcom.mysql.jdbc.jdk6.javac="%{javac}" \ + -Dcom.mysql.jdbc.jdk6.java="%{java}" %install install -d -m 755 %{buildroot}%{_javadir} diff --git a/no-jdk5-requirement.patch b/no-jdk5-requirement.patch new file mode 100644 index 0000000..df19189 --- /dev/null +++ b/no-jdk5-requirement.patch @@ -0,0 +1,53 @@ +Index: mysql-connector-java-5.1.35/build.xml +=================================================================== +--- mysql-connector-java-5.1.35.orig/build.xml ++++ mysql-connector-java-5.1.35/build.xml +@@ -219,7 +219,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye + + + +- ++ + + + +@@ -756,7 +756,7 @@ Java 6 (for JDBC4+ implementation) is al + + ++ depends="-compile-driver-jdbc4" /> + + + +@@ -787,7 +787,7 @@ Java 6 (for JDBC4+ implementation) is al + + + +- ++ + Compiling MySQL Connector/J JDBC4+ implementation with '${com.mysql.jdbc.jdk6}' to '${compiler.output}' + + +- +- +- +- +- +- +- + + ++ + + +