diff --git a/mysql-connector-java-jdbc-4.1.patch b/mysql-connector-java-jdbc-4.1.patch index 7d0a0f0..83a7a5a 100644 --- a/mysql-connector-java-jdbc-4.1.patch +++ b/mysql-connector-java-jdbc-4.1.patch @@ -272,15 +272,17 @@ Index: mysql-connector-java-5.1.35/src/com/mysql/jdbc/Driver.java /** * 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 +@@ -61,4 +63,10 @@ public class Driver extends NonRegisteri + public Driver() throws SQLException { // 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 @@ -1502,10 +1504,10 @@ Index: mysql-connector-java-5.1.35/src/testsuite/regression/StatementRegressionT pStmt.executeUpdate(); } finally { if (pStmt != null) { -@@ -5277,6 +5283,271 @@ public class StatementRegressionTest ext - - Connection conn1 = null; - +@@ -4606,6 +4612,271 @@ public class StatementRegressionTest ext + public int getBytesSize() throws SQLException { + return 0; + } + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new SQLFeatureNotSupportedException("Not supported"); @@ -1771,8 +1773,8 @@ Index: mysql-connector-java-5.1.35/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)); + }; + } @@ -6911,6 +7182,7 @@ public class StatementRegressionTest ext expectedUpdCountBatchPStmt = expectedUpdCountBatchPStmtRW; diff --git a/mysql-connector-java.changes b/mysql-connector-java.changes index 3a137cb..ed9b1ef 100644 --- a/mysql-connector-java.changes +++ b/mysql-connector-java.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 11 15:11:55 UTC 2015 - tchvatal@suse.com + +- Fix the patches to allow jdbc3 build and reenable it: + * mysql-connector-java-jdbc-4.1.patch + * no-jdk5-requirement.patch + ------------------------------------------------------------------- Tue Apr 21 15:22:44 UTC 2015 - tchvatal@suse.com diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index 0416ddc..28f6a51 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -104,7 +104,8 @@ ant \ -DbuildDir=build-mysql-jdbc \ -DdistDir=dist-mysql-jdbc \ -Dcom.mysql.jdbc.jdk6.javac="%{javac}" \ - -Dcom.mysql.jdbc.jdk6.java="%{java}" + -Dcom.mysql.jdbc.jdk6.java="%{java}" \ + dist %install install -d -m 755 %{buildroot}%{_javadir} diff --git a/no-jdk5-requirement.patch b/no-jdk5-requirement.patch index df19189..c59e73e 100644 --- a/no-jdk5-requirement.patch +++ b/no-jdk5-requirement.patch @@ -11,43 +11,21 @@ Index: mysql-connector-java-5.1.35/build.xml -@@ -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}' - - -- -- -- -- -- -- -- + +@@ -820,7 +820,7 @@ Java 6 (for JDBC4+ implementation) is al + deprecation="off" + debug="${debug.enable}" + fork="yes" +- executable="${com.mysql.jdbc.jdk5.javac}" ++ executable="${com.mysql.jdbc.jdk6.javac}" + compiler="modern" + includeantruntime="false"> +