- Remove upstreamed mysql-connector-java-5.1.35-CVE-2017-3523.patch

- Refresh patch extra-libs-build.patch
- Drop obsolete patch jdk6-check-use-jdk7.patch
- Refresh patch no-jdk5-requirement.patch
- Attempt to refresh mysql-connector-java-jdbc-4.1.patch
  * Partialy merged by upstream, many conflicts

OBS-URL: https://build.opensuse.org/package/show/Java:packages/mysql-connector-java?expand=0&rev=33
This commit is contained in:
Tomáš Chvátal 2017-05-18 11:05:10 +00:00 committed by Git OBS Bridge
parent 6b950ddb9b
commit 94b1cd0d11
6 changed files with 153 additions and 404 deletions

View File

@ -1,8 +1,8 @@
Index: mysql-connector-java-5.1.35/build.xml Index: mysql-connector-java-5.1.42/build.xml
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/build.xml --- mysql-connector-java-5.1.42.orig/build.xml
+++ mysql-connector-java-5.1.35/build.xml +++ mysql-connector-java-5.1.42/build.xml
@@ -449,7 +449,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -513,7 +513,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Add commercial license configuration class (Build). --> <!-- Add commercial license configuration class (Build). -->
@ -11,7 +11,7 @@ Index: mysql-connector-java-5.1.35/build.xml
<copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava" <copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava"
toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/LicenseConfiguration.java" toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/LicenseConfiguration.java"
overwrite="true" /> overwrite="true" />
@@ -457,7 +457,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -521,7 +521,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Add no-crypto export control class (Build). --> <!-- Add no-crypto export control class (Build). -->
@ -20,7 +20,7 @@ Index: mysql-connector-java-5.1.35/build.xml
<copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava" <copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava"
toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/ExportControlled.java" toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/ExportControlled.java"
overwrite="true" /> overwrite="true" />
@@ -465,7 +465,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -529,7 +529,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Copy commercial license configuration class (Package). --> <!-- Copy commercial license configuration class (Package). -->
@ -29,7 +29,7 @@ Index: mysql-connector-java-5.1.35/build.xml
<copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava" <copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava"
toFile="${packageDest}/src/com/mysql/jdbc/LicenseConfiguration.java" toFile="${packageDest}/src/com/mysql/jdbc/LicenseConfiguration.java"
overwrite="true" /> overwrite="true" />
@@ -473,7 +473,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -537,7 +537,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Copy no-crypto export control class (Package). --> <!-- Copy no-crypto export control class (Package). -->
@ -38,16 +38,16 @@ Index: mysql-connector-java-5.1.35/build.xml
<copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava" <copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava"
toFile="${packageDest}/src/com/mysql/jdbc/ExportControlled.java" toFile="${packageDest}/src/com/mysql/jdbc/ExportControlled.java"
overwrite="true" /> overwrite="true" />
@@ -481,7 +481,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -545,7 +545,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Copy README-commercial info (Package). --> <!-- Copy README-commercial info (Package). -->
- <target name="-copy-license-commercial" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.commercialBuild"> - <target name="-copy-readme-commercial" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.commercialBuild">
+ <target name="-copy-license-commercial" depends="-init-copy" if="com.mysql.jdbc.commercialBuild"> + <target name="-copy-readme-commercial" depends="-init-copy" if="com.mysql.jdbc.commercialBuild">
<copy file="${com.mysql.jdbc.extra.libs}/README-commercial" tofile="${packageDest}/README.txt" filtering="true"> <copy file="${com.mysql.jdbc.extra.libs}/README-commercial" tofile="${packageDest}/README.txt" filtering="true">
<filterset refid="versionFilterset" /> <filterset refid="versionFilterset" />
<filterset refid="licenseFilterset" /> <filterset refid="licenseFilterset" />
@@ -500,7 +500,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -564,7 +564,7 @@ Java 8 (for JDBC 4+ implementation) is a
<!-- Copy LICENCE.mysql and replace license commercial headers (Package). --> <!-- Copy LICENCE.mysql and replace license commercial headers (Package). -->
@ -56,9 +56,9 @@ Index: mysql-connector-java-5.1.35/build.xml
<delete file="${packageDest}/COPYING" /> <delete file="${packageDest}/COPYING" />
<copy file="${com.mysql.jdbc.extra.libs}/LICENSE.mysql" toDir="${packageDest}" /> <copy file="${com.mysql.jdbc.extra.libs}/LICENSE.mysql" toDir="${packageDest}" />
@@ -773,6 +773,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -860,6 +860,7 @@ Java 8 (for JDBC 4+ implementation) is a
compiler="modern" source="1.5"
includeantruntime="false"> target="1.5">
<include name="**/*.java" /> <include name="**/*.java" />
+ <exclude name="demo/**" /> + <exclude name="demo/**" />
<exclude name="testsuite/**" /> <exclude name="testsuite/**" />

View File

@ -1,16 +0,0 @@
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
<fail message="Java 6 (for JDBC4+ implementation) is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk6'. Default: '/usr/lib/jvm/jdk1.6'.">
<condition>
<not>
- <and>
- <equals arg1="${jdk6checkexitstatus}" arg2="0" />
- <contains string="${com.mysql.jdbc.jdk6.version}" substring="java version &quot;1.6" casesensitive="true" />
- </and>
+ <equals arg1="${jdk6checkexitstatus}" arg2="0" />
</not>
</condition>
</fail>

View File

@ -1,7 +1,7 @@
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/CallableStatement.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/CallableStatement.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/CallableStatement.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/CallableStatement.java
@@ -32,11 +32,15 @@ import java.net.URL; @@ -32,11 +32,15 @@ import java.net.URL;
import java.sql.Array; import java.sql.Array;
import java.sql.Blob; import java.sql.Blob;
@ -18,22 +18,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.sql.Types; import java.sql.Types;
@@ -410,10 +414,10 @@ public class CallableStatement extends P @@ -2432,4 +2436,95 @@ public class CallableStatement extends P
* If no object found that implements the interface
* @since 1.6 return super.executeLargeBatch();
*/
- public Object unwrap(Class<?> iface) throws java.sql.SQLException {
+ public <T> T unwrap(java.lang.Class<T> 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 + @Override
@ -127,16 +114,17 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/CallableStatement.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/ConnectionImpl.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ConnectionImpl.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/ConnectionImpl.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/ConnectionImpl.java
@@ -35,11 +35,16 @@ import java.nio.charset.Charset; @@ -36,12 +36,17 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder; import java.nio.charset.CharsetEncoder;
import java.sql.Blob; import java.sql.Blob;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
+import java.sql.NClob; +import java.sql.NClob;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException; import java.sql.SQLException;
+import java.sql.SQLXML; +import java.sql.SQLXML;
import java.sql.SQLPermission; import java.sql.SQLPermission;
@ -148,9 +136,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
@@ -5565,4 +5570,71 @@ public class ConnectionImpl extends Conn @@ -5507,4 +5512,71 @@ public class ConnectionImpl extends Conn
public void setProfilerEventHandlerInstance(ProfilerEventHandler h) { }
this.eventSink = h; }
} }
+ +
+ @Override + @Override
@ -220,10 +208,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/DatabaseMetaData.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/DatabaseMetaData.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/DatabaseMetaData.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/DatabaseMetaData.java
@@ -33,6 +33,8 @@ import java.sql.ResultSet; @@ -33,6 +33,8 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
@ -233,7 +221,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@@ -7869,4 +7871,25 @@ public class DatabaseMetaData implements @@ -7902,4 +7904,25 @@ public class DatabaseMetaData implements
public boolean generatedKeyAlwaysReturned() throws SQLException { public boolean generatedKeyAlwaysReturned() throws SQLException {
return true; return true;
} }
@ -259,10 +247,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/DatabaseMetaData.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/Driver.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/Driver.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/Driver.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/Driver.java
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
package com.mysql.jdbc; package com.mysql.jdbc;
@ -283,10 +271,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4Connection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4Connection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/JDBC4Connection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4Connection.java
@@ -27,9 +27,11 @@ import java.sql.Blob; @@ -27,9 +27,11 @@ import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
import java.sql.SQLClientInfoException; import java.sql.SQLClientInfoException;
@ -299,7 +287,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java
import java.util.Properties; import java.util.Properties;
import java.util.TimerTask; import java.util.TimerTask;
@@ -197,7 +199,8 @@ public class JDBC4Connection extends Con @@ -200,7 +202,8 @@ public class JDBC4Connection extends Con
/** /**
* @see java.sql.Connection#createClob() * @see java.sql.Connection#createClob()
*/ */
@ -309,7 +297,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java
return new com.mysql.jdbc.Clob(getExceptionInterceptor()); return new com.mysql.jdbc.Clob(getExceptionInterceptor());
} }
@@ -233,4 +236,25 @@ public class JDBC4Connection extends Con @@ -236,4 +239,25 @@ public class JDBC4Connection extends Con
return this.infoProvider; return this.infoProvider;
} }
} }
@ -335,10 +323,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4Connection.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java
@@ -27,9 +27,11 @@ import java.sql.Blob; @@ -27,9 +27,11 @@ import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
import java.sql.SQLClientInfoException; import java.sql.SQLClientInfoException;
@ -405,11 +393,11 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConn
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MySQLConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4MySQLConnection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4MySQLConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/JDBC4MySQLConnection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MySQLConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4MySQLConnection.java
@@ -59,10 +59,13 @@ public interface JDBC4MySQLConnection ex @@ -59,11 +59,14 @@ public interface JDBC4MySQLConnection ex
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException; public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException;
@ -425,11 +413,12 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MySQLConnection.java
+ @Override + @Override
+ public NClob createNClob() throws SQLException; + public NClob createNClob() throws SQLException;
} /*
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MysqlParameterMetadata.java * Non standard methods:
Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/MysqlParameterMetadata.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/MysqlParameterMetadata.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/MysqlParameterMetadata.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/MysqlParameterMetadata.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/MysqlParameterMetadata.java
@@ -25,6 +25,7 @@ package com.mysql.jdbc; @@ -25,6 +25,7 @@ package com.mysql.jdbc;
import java.sql.ParameterMetaData; import java.sql.ParameterMetaData;
@ -438,23 +427,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MysqlParameterMetadata.jav
import java.sql.Types; import java.sql.Types;
public class MysqlParameterMetadata implements ParameterMetaData { public class MysqlParameterMetadata implements ParameterMetaData {
@@ -199,10 +200,10 @@ public class MysqlParameterMetadata impl Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/NonRegisteringDriver.java
* If no object found that implements the interface
* @since 1.6
*/
- public Object unwrap(Class<?> iface) throws java.sql.SQLException {
+ public <T> T unwrap(java.lang.Class<T> 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.42.orig/src/com/mysql/jdbc/NonRegisteringDriver.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/NonRegisteringDriver.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/NonRegisteringDriver.java
@@ -31,6 +31,7 @@ import java.lang.ref.ReferenceQueue; @@ -31,6 +31,7 @@ import java.lang.ref.ReferenceQueue;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.sql.DriverPropertyInfo; import java.sql.DriverPropertyInfo;
@ -473,7 +449,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/NonRegisteringDriver.java
/** /**
* The Java SQL framework allows for multiple database drivers. Each driver should supply a class that implements the Driver interface * 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 @@ -908,4 +912,9 @@ public class NonRegisteringDriver implem
} }
} }
} }
@ -483,10 +459,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/NonRegisteringDriver.java
+ throw new SQLFeatureNotSupportedException("Not supported"); + throw new SQLFeatureNotSupportedException("Not supported");
+ } + }
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/PreparedStatement.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/PreparedStatement.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/PreparedStatement.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/PreparedStatement.java
@@ -41,6 +41,7 @@ import java.nio.charset.Charset; @@ -41,6 +41,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder; import java.nio.charset.CharsetEncoder;
import java.sql.Array; import java.sql.Array;
@ -505,9 +481,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java
import java.text.ParsePosition; import java.text.ParsePosition;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@@ -5166,4 +5170,20 @@ public class PreparedStatement extends c @@ -5103,4 +5107,20 @@ public class PreparedStatement extends c
return StringUtils.startsWithIgnoreCaseAndWs(sql, "INSERT", statementStartPos) public long executeLargeUpdate() throws SQLException {
&& StringUtils.indexOfIgnoreCase(statementStartPos, sql, "SELECT", "\"'`", "\"'`", StringUtils.SEARCH_MODE__MRK_COM_WS) == -1 && rewritableOdku; return executeUpdateInternal(true, false);
} }
+ +
+ @Override + @Override
@ -526,97 +502,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/PreparedStatement.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ReplicationConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/ResultSetImpl.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ReplicationConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/ResultSetImpl.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ReplicationConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/ResultSetImpl.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> T unwrap(java.lang.Class<T> 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; @@ -27,6 +27,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -639,7 +528,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetImpl.java
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.sql.Types; import java.sql.Types;
@@ -7917,4 +7922,250 @@ public class ResultSetImpl implements Re @@ -7890,4 +7895,250 @@ public class ResultSetImpl implements Re
protected ExceptionInterceptor getExceptionInterceptor() { protected ExceptionInterceptor getExceptionInterceptor() {
return this.exceptionInterceptor; return this.exceptionInterceptor;
} }
@ -890,10 +779,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetImpl.java
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/ResultSetMetaData.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/ResultSetMetaData.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/ResultSetMetaData.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/ResultSetMetaData.java
@@ -23,7 +23,9 @@ @@ -23,7 +23,9 @@
package com.mysql.jdbc; package com.mysql.jdbc;
@ -904,17 +793,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java
import java.sql.Types; import java.sql.Types;
/** /**
@@ -832,12 +834,16 @@ public class ResultSetMetaData implement @@ -816,4 +818,8 @@ 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> T unwrap(java.lang.Class<T> 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); throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
} }
} }
@ -923,11 +802,11 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java
+ throw new SQLFeatureNotSupportedException("Not supported"); + throw new SQLFeatureNotSupportedException("Not supported");
+ } + }
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/StatementImpl.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/StatementImpl.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/StatementImpl.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/StatementImpl.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/StatementImpl.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/StatementImpl.java
@@ -31,6 +31,8 @@ import java.sql.ResultSet; @@ -33,6 +33,8 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLWarning; import java.sql.SQLWarning;
import java.sql.Types; import java.sql.Types;
@ -936,23 +815,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/StatementImpl.java
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
@@ -2700,10 +2702,10 @@ public class StatementImpl implements St Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java
* If no object found that implements the interface
* @since 1.6
*/
- public Object unwrap(Class<?> iface) throws java.sql.SQLException {
+ public <T> T unwrap(java.lang.Class<T> 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.42.orig/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java
@@ -33,8 +33,12 @@ import java.sql.Blob; @@ -33,8 +33,12 @@ import java.sql.Blob;
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.Clob; import java.sql.Clob;
@ -966,8 +832,8 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/CallableSta
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
@@ -2345,4 +2349,169 @@ public class CallableStatementWrapper ex @@ -2333,4 +2337,169 @@ public class CallableStatementWrapper ex
// throw SQLError.notImplemented(); // throw SQLError.createSQLFeatureNotSupportedException();
// } // }
+ @Override + @Override
@ -1136,10 +1002,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/CallableSta
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java
@@ -24,8 +24,15 @@ @@ -24,8 +24,15 @@
package com.mysql.jdbc.jdbc2.optional; package com.mysql.jdbc.jdbc2.optional;
@ -1156,9 +1022,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionW
import java.sql.Statement; import java.sql.Statement;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
@@ -2836,4 +2843,67 @@ public class ConnectionWrapper extends W @@ -2885,4 +2892,67 @@ public class ConnectionWrapper extends W
public void setEnabledSSLCipherSuites(String cipherSuites) { public boolean isUseSSLExplicit() {
this.mc.setEnabledSSLCipherSuites(cipherSuites); return this.mc.isUseSSLExplicit();
} }
+ +
+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
@ -1224,10 +1090,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionW
+ throw new SQLFeatureNotSupportedException("Not supported"); + throw new SQLFeatureNotSupportedException("Not supported");
+ } + }
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java
@@ -26,8 +26,10 @@ package com.mysql.jdbc.jdbc2.optional; @@ -26,8 +26,10 @@ package com.mysql.jdbc.jdbc2.optional;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.Serializable; import java.io.Serializable;
@ -1239,9 +1105,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSo
import javax.naming.NamingException; import javax.naming.NamingException;
import javax.naming.Reference; import javax.naming.Reference;
@@ -429,4 +431,20 @@ public class MysqlDataSource extends Con @@ -435,4 +437,20 @@ public class MysqlDataSource extends Con
// public <T> T unwrap(Class<T> iface) throws SQLException { // public <T> T unwrap(Class<T> iface) throws SQLException {
// throw SQLError.notImplemented(); // throw SQLError.createSQLFeatureNotSupportedException();
// } // }
+ +
+ @Override + @Override
@ -1260,10 +1126,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlDataSo
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java
@@ -26,6 +26,7 @@ package com.mysql.jdbc.jdbc2.optional; @@ -26,6 +26,7 @@ package com.mysql.jdbc.jdbc2.optional;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.sql.Connection; import java.sql.Connection;
@ -1296,10 +1162,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/MysqlPooled
+ } + }
+ +
+} +}
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java
@@ -32,12 +32,16 @@ import java.sql.Array; @@ -32,12 +32,16 @@ import java.sql.Array;
import java.sql.Blob; import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
@ -1317,118 +1183,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/PreparedSta
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
@@ -1091,4 +1095,107 @@ public class PreparedStatementWrapper ex Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java
// 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.35/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java
@@ -27,6 +27,7 @@ import java.lang.reflect.Constructor; @@ -27,6 +27,7 @@ import java.lang.reflect.Constructor;
import java.sql.Connection; import java.sql.Connection;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -1437,7 +1195,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/StatementWr
import java.sql.SQLWarning; import java.sql.SQLWarning;
import java.sql.Statement; import java.sql.Statement;
@@ -767,4 +768,40 @@ public class StatementWrapper extends Wr @@ -722,4 +723,40 @@ public class StatementWrapper extends Wr
checkAndFireConnectionError(sqlEx); checkAndFireConnectionError(sqlEx);
} }
} }
@ -1478,10 +1236,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/StatementWr
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionTest.java Index: mysql-connector-java-5.1.42/src/testsuite/regression/StatementRegressionTest.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/testsuite/regression/StatementRegressionTest.java --- mysql-connector-java-5.1.42.orig/src/testsuite/regression/StatementRegressionTest.java
+++ mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionTest.java +++ mysql-connector-java-5.1.42/src/testsuite/regression/StatementRegressionTest.java
@@ -52,6 +52,11 @@ import java.sql.Ref; @@ -52,6 +52,11 @@ import java.sql.Ref;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
@ -1494,7 +1252,7 @@ Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionT
import java.sql.SQLWarning; import java.sql.SQLWarning;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Time; import java.sql.Time;
@@ -2320,7 +2325,8 @@ public class StatementRegressionTest ext @@ -2271,7 +2276,8 @@ public class StatementRegressionTest ext
try { try {
pStmt = this.conn.prepareStatement("INSERT INTO testNullClob VALUES (?)"); pStmt = this.conn.prepareStatement("INSERT INTO testNullClob VALUES (?)");
@ -1504,7 +1262,7 @@ Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionT
pStmt.executeUpdate(); pStmt.executeUpdate();
} finally { } finally {
if (pStmt != null) { if (pStmt != null) {
@@ -4606,6 +4612,271 @@ public class StatementRegressionTest ext @@ -4554,6 +4560,271 @@ public class StatementRegressionTest ext
public int getBytesSize() throws SQLException { public int getBytesSize() throws SQLException {
return 0; return 0;
} }
@ -1776,7 +1534,7 @@ Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionT
}; };
} }
@@ -6911,6 +7182,7 @@ public class StatementRegressionTest ext @@ -6802,6 +7073,7 @@ public class StatementRegressionTest ext
expectedUpdCountBatchPStmt = expectedUpdCountBatchPStmtRW; expectedUpdCountBatchPStmt = expectedUpdCountBatchPStmtRW;
expectedGenKeysBatchPStmt = versionMeetsMinimum(5, 5) ? expectedGenKeysForBatchPStmtRW : expectedGenKeysForBatchPStmtRW51; expectedGenKeysBatchPStmt = versionMeetsMinimum(5, 5) ? expectedGenKeysForBatchPStmtRW : expectedGenKeysForBatchPStmtRW51;
break; break;
@ -1784,10 +1542,10 @@ Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionT
case 4: case 4:
// dontCheckOnDuplicateKeyUpdateInSQL=true is canceled by rewriteBatchedStatements=true // dontCheckOnDuplicateKeyUpdateInSQL=true is canceled by rewriteBatchedStatements=true
testConn = getConnectionWithProps("rewriteBatchedStatements=true,dontCheckOnDuplicateKeyUpdateInSQL=true"); testConn = getConnectionWithProps("rewriteBatchedStatements=true,dontCheckOnDuplicateKeyUpdateInSQL=true");
Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java Index: mysql-connector-java-5.1.42/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.42.orig/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java
+++ mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java +++ mysql-connector-java-5.1.42/src/com/mysql/fabric/jdbc/FabricMySQLConnectionProxy.java
@@ -23,13 +23,20 @@ @@ -23,13 +23,20 @@
package com.mysql.fabric.jdbc; package com.mysql.fabric.jdbc;
@ -1808,9 +1566,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnecti
+import java.sql.Struct; +import java.sql.Struct;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.Collections;
@@ -844,22 +851,6 @@ public class FabricMySQLConnectionProxy @@ -967,22 +974,6 @@ public class FabricMySQLConnectionProxy
return getActiveMySQLConnection().getMetadataSafeStatement(); return getActiveMySQLConnectionChecked().getMetadataSafeStatement();
} }
- /** - /**
@ -1832,7 +1590,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnecti
public void unSafeStatementInterceptors() throws SQLException { public void unSafeStatementInterceptors() throws SQLException {
} }
@@ -2891,14 +2882,6 @@ public class FabricMySQLConnectionProxy @@ -3023,19 +3014,6 @@ public class FabricMySQLConnectionProxy
public void clearWarnings() { public void clearWarnings() {
} }
@ -1840,6 +1598,11 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnecti
- return null; - return null;
- } - }
- -
- /**
- *
- * @param name
- * @return
- */
- public String getClientInfo(String name) { - public String getClientInfo(String name) {
- return null; - return null;
- } - }
@ -1847,7 +1610,7 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnecti
public int getHoldability() { public int getHoldability() {
return -1; return -1;
} }
@@ -2928,4 +2911,64 @@ public class FabricMySQLConnectionProxy @@ -3065,4 +3043,64 @@ public class FabricMySQLConnectionProxy
public void decachePreparedStatement(ServerPreparedStatement pstmt) throws SQLException { public void decachePreparedStatement(ServerPreparedStatement pstmt) throws SQLException {
} }
@ -1912,10 +1675,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLConnecti
+ } + }
+ +
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/MultiHostMySQLConnection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/MultiHostMySQLConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/MultiHostMySQLConnection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/MultiHostMySQLConnection.java
@@ -23,6 +23,12 @@ @@ -23,6 +23,12 @@
package com.mysql.jdbc; package com.mysql.jdbc;
@ -1929,9 +1692,9 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.j
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
@@ -2411,4 +2417,67 @@ public class MultiHostMySQLConnection im @@ -2482,4 +2488,67 @@ public class MultiHostMySQLConnection im
public void setEnabledSSLCipherSuites(String cipherSuites) { public boolean isUseSSLExplicit() {
getActiveMySQLConnection().setEnabledSSLCipherSuites(cipherSuites); return getActiveMySQLConnection().isUseSSLExplicit();
} }
+ +
+ @Override + @Override
@ -1997,10 +1760,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/MultiHostMySQLConnection.j
+ throw new SQLFeatureNotSupportedException("Not supported"); + throw new SQLFeatureNotSupportedException("Not supported");
+ } + }
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java Index: mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java --- mysql-connector-java-5.1.42.orig/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java
+++ mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java +++ mysql-connector-java-5.1.42/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnection.java
@@ -102,21 +102,24 @@ public class JDBC4MultiHostMySQLConnecti @@ -102,21 +102,24 @@ public class JDBC4MultiHostMySQLConnecti
/** /**
* @see java.sql.Connection#createBlob() * @see java.sql.Connection#createBlob()
@ -2029,10 +1792,10 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/JDBC4MultiHostMySQLConnect
return this.getJDBC4Connection().createNClob(); return this.getJDBC4Connection().createNClob();
} }
Index: mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java Index: mysql-connector-java-5.1.42/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.42.orig/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java
+++ mysql-connector-java-5.1.35/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java +++ mysql-connector-java-5.1.42/src/com/mysql/fabric/jdbc/FabricMySQLDriver.java
@@ -28,6 +28,7 @@ import java.sql.Connection; @@ -28,6 +28,7 @@ import java.sql.Connection;
import java.sql.Driver; import java.sql.Driver;
import java.sql.DriverManager; import java.sql.DriverManager;

View File

@ -5,6 +5,11 @@ Thu May 18 10:42:07 UTC 2017 - tchvatal@suse.com
* CVE-2017-3589 CVE-2017-3523 CVE-2017-3586 * CVE-2017-3589 CVE-2017-3523 CVE-2017-3586
* http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html * http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html
- Remove upstreamed mysql-connector-java-5.1.35-CVE-2017-3523.patch - Remove upstreamed mysql-connector-java-5.1.35-CVE-2017-3523.patch
- Refresh patch extra-libs-build.patch
- Drop obsolete patch jdk6-check-use-jdk7.patch
- Refresh patch no-jdk5-requirement.patch
- Attempt to refresh mysql-connector-java-jdbc-4.1.patch
* Partialy merged by upstream, many conflicts
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 2 15:20:16 UTC 2017 - pmonrealgonzalez@suse.com Tue May 2 15:20:16 UTC 2017 - pmonrealgonzalez@suse.com

View File

@ -27,8 +27,6 @@ Source0: %{name}-%{version}-suse.tar.xz
# Script to repack upstream tarball # Script to repack upstream tarball
# ./generate-tarball.sh VERSION # ./generate-tarball.sh VERSION
Source99: generate-tarball.sh 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 # PATCH-FIX-UPSTREAM: do not require hibernate4 to actually just build
Patch1: extra-libs-build.patch Patch1: extra-libs-build.patch
# PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java # PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java
@ -69,7 +67,6 @@ set that supports the capabilities of MySQL.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
@ -100,11 +97,11 @@ export CLASSPATH=$(build-classpath \
junit \ junit \
log4j) log4j)
ant \ ant \
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \ -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
-DbuildDir=build-mysql-jdbc \ -DbuildDir=build-mysql-jdbc \
-DdistDir=dist-mysql-jdbc \ -DdistDir=dist-mysql-jdbc \
-Dcom.mysql.jdbc.jdk6.javac="%{javac}" \ -Dcom.mysql.jdbc.jdk8.javac="%{javac}" \
-Dcom.mysql.jdbc.jdk6.java="%{java}" \ -Dcom.mysql.jdbc.jdk8.java="%{java}" \
dist dist
%install %install

View File

@ -1,31 +1,31 @@
Index: mysql-connector-java-5.1.35/build.xml Index: mysql-connector-java-5.1.42/build.xml
=================================================================== ===================================================================
--- mysql-connector-java-5.1.35.orig/build.xml --- mysql-connector-java-5.1.42.orig/build.xml
+++ mysql-connector-java-5.1.35/build.xml +++ mysql-connector-java-5.1.42/build.xml
@@ -219,7 +219,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye @@ -255,7 +255,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye
<!-- Check for required JDKs for compilation. --> <!-- Check for required JDKs for compilation. -->
- <target name="-compiler-check" depends="-jdk5-check, -jdk6-check" /> - <target name="-compiler-check" depends="-jdk5-check, -jdk8-check, -jre6-rtjar-check" />
+ <target name="-compiler-check" depends="-jdk6-check" /> + <target name="-compiler-check" depends="-jdk8-check, -jre6-rtjar-check" />
<!-- Check for required JDK5 for compilation of JDBC 3 implementation. --> <!-- Check for required JDK5 for compilation of JDBC 3 implementation. -->
@@ -769,7 +769,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -854,7 +854,7 @@ Java 8 (for JDBC 4+ implementation) is a
deprecation="off" deprecation="off"
debug="${debug.enable}" debug="${debug.enable}"
fork="yes" fork="yes"
- executable="${com.mysql.jdbc.jdk5.javac}" - executable="${com.mysql.jdbc.jdk5.javac}"
+ executable="${com.mysql.jdbc.jdk6.javac}" + executable="${com.mysql.jdbc.jdk6.javac}"
compiler="modern" compiler="modern"
includeantruntime="false"> includeantruntime="false"
<include name="**/*.java" /> source="1.5"
@@ -820,7 +820,7 @@ Java 6 (for JDBC4+ implementation) is al @@ -929,7 +929,7 @@ Java 8 (for JDBC 4+ implementation) is a
deprecation="off" deprecation="off"
debug="${debug.enable}" debug="${debug.enable}"
fork="yes" fork="yes"
- executable="${com.mysql.jdbc.jdk5.javac}" - executable="${com.mysql.jdbc.jdk5.javac}"
+ executable="${com.mysql.jdbc.jdk6.javac}" + executable="${com.mysql.jdbc.jdk6.javac}"
compiler="modern" compiler="modern"
includeantruntime="false"> includeantruntime="false"
<include name="testsuite/**" /> source="1.5"