diff --git a/mysql-connector-java-5.1.19-java7.patch b/mysql-connector-java-5.1.19-java7.patch new file mode 100644 index 0000000..f928aa9 --- /dev/null +++ b/mysql-connector-java-5.1.19-java7.patch @@ -0,0 +1,81 @@ +diff -Naur mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4Connection.java mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4Connection.java +--- mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4Connection.java 2011-07-04 10:24:08.000000000 -0400 ++++ mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4Connection.java 2012-05-03 18:03:28.311324320 -0400 +@@ -28,9 +28,11 @@ + 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; + +@@ -234,4 +236,25 @@ + + 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"); ++ } ++ + } +diff -Naur mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java +--- mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java 2011-07-04 10:24:08.000000000 -0400 ++++ mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java 2012-05-03 18:03:28.312324397 -0400 +@@ -29,9 +29,11 @@ + 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; + +@@ -129,4 +131,24 @@ + 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"); ++ } + } diff --git a/mysql-connector-java-5.1.19-suse.tar.xz b/mysql-connector-java-5.1.19-suse.tar.xz index e74b82b..75759d5 100644 --- a/mysql-connector-java-5.1.19-suse.tar.xz +++ b/mysql-connector-java-5.1.19-suse.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6690c7895dad63bf2c81c62865ff123f607c27cd3086c982692f8f81942decfd -size 2054192 +oid sha256:5715fe210ad0d6ff606841b65ea02840babbf4d0c881e30478d2f9bcb6762420 +size 1307836 diff --git a/mysql-connector-java-5.1.6-disableJDBC4.patch b/mysql-connector-java-5.1.6-disableJDBC4.patch deleted file mode 100644 index 58af851..0000000 --- a/mysql-connector-java-5.1.6-disableJDBC4.patch +++ /dev/null @@ -1,60 +0,0 @@ -# This patch was taken from Debian package libmysql-java. It disables JDBC 4 support. -Index: build.xml -=================================================================== ---- build.xml.orig 2012-04-25 11:15:50.608856591 +0200 -+++ build.xml 2012-04-25 15:52:16.992070845 +0200 -@@ -135,7 +135,7 @@ - - - -- -+ - -@@ -429,7 +429,7 @@ - -
- -- -+ - - - -@@ -756,12 +756,12 @@ - - - -- -+ - - - - -- -+ - - - - -Index: src/com/mysql/jdbc/Util.java -=================================================================== ---- src/com/mysql/jdbc/Util.java.orig 2012-04-25 15:51:26.894312592 +0200 -+++ src/com/mysql/jdbc/Util.java 2012-04-25 15:52:38.843837776 +0200 -@@ -105,7 +105,7 @@ - - try { - Class.forName("java.sql.NClob"); -- isJdbc4 = true; -+ isJdbc4 = false; - } catch (Throwable t) { - isJdbc4 = false; - } diff --git a/mysql-connector-java-5.1.6-java6-compatibility.patch b/mysql-connector-java-5.1.6-java6-compatibility.patch deleted file mode 100644 index 56e705f..0000000 --- a/mysql-connector-java-5.1.6-java6-compatibility.patch +++ /dev/null @@ -1,1258 +0,0 @@ ---- - src/com/mysql/jdbc/CallableStatement.java | 99 ++++ - src/com/mysql/jdbc/Connection.java | 3 - src/com/mysql/jdbc/ConnectionImpl.java | 59 ++ - src/com/mysql/jdbc/DatabaseMetaData.java | 33 + - src/com/mysql/jdbc/LoadBalancedMySQLConnection.java | 62 ++ - src/com/mysql/jdbc/PreparedStatement.java | 20 - src/com/mysql/jdbc/ReplicationConnection.java | 68 +++ - src/com/mysql/jdbc/ResultSetImpl.java | 209 ++++++++++ - src/com/mysql/jdbc/Util.java | 23 + - src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java | 143 ++++++ - src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java | 66 +++ - src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java | 11 - src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java | 14 - src/com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.java | 12 - src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java | 88 ++++ - src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java | 23 + - src/com/mysql/jdbc/jdbc2/optional/SuspendableXAConnection.java | 12 - 17 files changed, 931 insertions(+), 14 deletions(-) - -Index: src/com/mysql/jdbc/CallableStatement.java -=================================================================== ---- src/com/mysql/jdbc/CallableStatement.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/CallableStatement.java 2012-04-27 10:49:12.534118098 +0200 -@@ -39,6 +39,10 @@ - import java.sql.Time; - import java.sql.Timestamp; - import java.sql.Types; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.RowId; -+import java.sql.SQLFeatureNotSupportedException; - import java.util.ArrayList; - import java.util.Calendar; - import java.util.HashMap; -@@ -426,16 +430,16 @@ - * @throws java.sql.SQLException If no object found that implements the interface - * @since 1.6 - */ -- public Object unwrap(Class iface) throws java.sql.SQLException { -- try { -- // This works for classes that aren't actually wrapping -- // anything -- return Util.cast(iface, this); -- } catch (ClassCastException cce) { -- throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), -- SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); -- } -- } -+ public T unwrap(Class iface) throws java.sql.SQLException { -+ try { -+ // This works for classes that aren't actually wrapping -+ // anything -+ return Util.cast(iface, this); -+ } catch (ClassCastException cce) { -+ throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), -+ SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); -+ } -+ } - } - - private final static int NOT_OUTPUT_PARAMETER_INDICATOR = Integer.MIN_VALUE; -@@ -2522,5 +2526,78 @@ - } - - -- -+ // Java6 build - interface java.sql.CallableStatement -+ -+ public RowId getRowId(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public RowId getRowId(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setRowId(String parameterName, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNString(String parameterName, String value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, NClob value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob (int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob (String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getCharacterStream(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ - } -Index: src/com/mysql/jdbc/ConnectionImpl.java -=================================================================== ---- src/com/mysql/jdbc/ConnectionImpl.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/ConnectionImpl.java 2012-04-25 11:15:37.494385815 +0200 -@@ -37,6 +37,12 @@ - import java.sql.SQLException; - import java.sql.SQLWarning; - import java.sql.Savepoint; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; - import java.util.ArrayList; - import java.util.Calendar; - import java.util.Collections; -@@ -5639,4 +5645,57 @@ - getLog().logWarn(Messages.getString("Connection.NoMetadataOnSocketFactory")); - return false; - } -+ // Java6 build - interface java.sql.Connection -+ -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/DatabaseMetaData.java -=================================================================== ---- src/com/mysql/jdbc/DatabaseMetaData.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/DatabaseMetaData.java 2012-04-25 11:15:37.496385887 +0200 -@@ -30,6 +30,13 @@ - import java.sql.SQLException; - import java.sql.Statement; - import java.sql.Types; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; -+import java.sql.RowIdLifetime; - import java.util.ArrayList; - import java.util.Collections; - import java.util.HashMap; -@@ -8324,4 +8331,30 @@ - - return pStmt; - } -+ -+ // Java6 build - interface java.sql.DatabaseMetaData -+ -+ public RowIdLifetime getRowIdLifetime() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean autoCommitFailureClosesAllResultSets() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public ResultSet getClientInfoProperties() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/PreparedStatement.java -=================================================================== ---- src/com/mysql/jdbc/PreparedStatement.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/PreparedStatement.java 2012-04-25 11:15:37.497385923 +0200 -@@ -48,6 +48,11 @@ - import java.sql.Time; - import java.sql.Timestamp; - import java.sql.Types; -+import java.sql.RowId; -+import java.sql.Blob; -+import java.sql.NClob; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLXML; - import java.text.ParsePosition; - import java.text.SimpleDateFormat; - import java.util.ArrayList; -@@ -5719,4 +5724,19 @@ - statementStartPos, sql, "SELECT", "\"'`", - "\"'`", false) == -1 && rewritableOdku; - } -+ -+ // Java6 build - interface java.sql.PreparedStatement -+ -+ public void setRowId(int parameterIndex, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(int parameterIndex, NClob value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ - } -Index: src/com/mysql/jdbc/ReplicationConnection.java -=================================================================== ---- src/com/mysql/jdbc/ReplicationConnection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/ReplicationConnection.java 2012-04-25 11:15:37.498385959 +0200 -@@ -31,6 +31,20 @@ - import java.util.Map; - import java.util.Properties; - import java.util.TimeZone; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; -+import java.sql.Clob; -+import java.sql.NClob; -+import java.sql.Blob; -+import java.sql.SQLXML; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.SQLClientInfoException; -+import java.sql.Array; - - import com.mysql.jdbc.log.Log; - -@@ -2584,4 +2598,58 @@ - public String getDefaultAuthenticationPlugin() { - return this.currentConnection.getDefaultAuthenticationPlugin(); - } -+ -+ // Java6 build - interface java.sql.Connection -+ -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/ResultSetImpl.java -=================================================================== ---- src/com/mysql/jdbc/ResultSetImpl.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/ResultSetImpl.java 2012-04-25 11:15:37.501386067 +0200 -@@ -31,6 +31,7 @@ - import java.io.ObjectInputStream; - import java.io.StringReader; - import java.io.UnsupportedEncodingException; -+import java.io.Reader; - import java.lang.reflect.Constructor; - import java.math.BigDecimal; - import java.math.BigInteger; -@@ -44,6 +45,12 @@ - import java.sql.Time; - import java.sql.Timestamp; - import java.sql.Types; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; - import java.util.Calendar; - import java.util.GregorianCalendar; - import java.util.HashMap; -@@ -8558,4 +8565,206 @@ - protected ExceptionInterceptor getExceptionInterceptor() { - return this.exceptionInterceptor; - } -+ -+ // Java6 build - interface java.sql.ResultSet -+ -+ public RowId getRowId(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public RowId getRowId(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateRowId(int columnIndex, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateRowId(String columnLabel, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public int getHoldability() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isClosed() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNString(int columnIndex, String nString) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNString(String columnLabel, String nString) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(String columnLabel, NClob nClob) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(String columnLabel) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateAsciiStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBinaryStream(int columnIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateCharacterStream(int columnIndex, java.io.Reader x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateAsciiStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBinaryStream(String columnLabel, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateCharacterStream(String columnLabel, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateAsciiStream(int columnIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBinaryStream(int columnIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateCharacterStream(int columnIndex, java.io.Reader x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateAsciiStream(String columnLabel, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBinaryStream(String columnLabel, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateCharacterStream(String columnLabel, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateClob(int columnIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateClob(String columnLabel, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(int columnIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void updateNClob(String columnLabel, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.java 2012-04-25 11:15:37.502386102 +0200 -@@ -39,6 +39,12 @@ - import java.sql.SQLException; - import java.sql.Time; - import java.sql.Timestamp; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; - import java.util.Calendar; - import java.util.Map; - -@@ -2636,4 +2642,141 @@ - // throw SQLError.notImplemented(); - // } - -+ // Java6 build - interface java.sql.CallableStatement -+ -+ public RowId getRowId(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public RowId getRowId(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setRowId(String parameterName, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNString(String parameterName, String value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, NClob value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClob(String parameterName, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob (int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob getNClob (String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML getSQLXML(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public String getNString(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.io.Reader getCharacterStream(String parameterName) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBlob (String parameterName, Blob x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClob (String parameterName, Clob x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setAsciiStream(String parameterName, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBinaryStream(String parameterName, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setCharacterStream(String parameterName, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setAsciiStream(String parameterName, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBinaryStream(String parameterName, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setCharacterStream(String parameterName, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNCharacterStream(String parameterName, Reader value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClob(String parameterName, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBlob(String parameterName, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(String parameterName, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java 2012-04-25 11:15:37.502386102 +0200 -@@ -29,6 +29,15 @@ - import java.sql.SQLException; - import java.sql.Savepoint; - import java.sql.Statement; -+import java.sql.Clob; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; -+import java.sql.Blob; -+import java.sql.Array; - import java.util.Map; - import java.util.Properties; - import java.util.TimeZone; -@@ -2783,4 +2792,59 @@ - public String getDefaultAuthenticationPlugin() { - return this.mc.getDefaultAuthenticationPlugin(); - } --} -\ No newline at end of file -+ -+ -+ // Java6 build - interface java.sql.Connection -+ -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+} -Index: src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.java 2012-04-25 11:15:37.503386138 +0200 -@@ -36,6 +36,7 @@ - import javax.naming.Referenceable; - import javax.naming.StringRefAddr; - import javax.sql.DataSource; -+import java.sql.SQLFeatureNotSupportedException; - - import com.mysql.jdbc.ConnectionPropertiesImpl; - import com.mysql.jdbc.NonRegisteringDriver; -@@ -447,4 +448,14 @@ - // public T unwrap(Class iface) throws SQLException { - // throw SQLError.notImplemented(); - // } -+ -+ // Java6 build - interface java.sql.Wrapper -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java 2012-04-25 11:15:37.503386138 +0200 -@@ -27,6 +27,7 @@ - import java.lang.reflect.Constructor; - import java.sql.Connection; - import java.sql.SQLException; -+import javax.sql.StatementEventListener; - import java.util.HashMap; - import java.util.Iterator; - import java.util.Map; -@@ -34,6 +35,7 @@ - import javax.sql.ConnectionEvent; - import javax.sql.ConnectionEventListener; - import javax.sql.PooledConnection; -+import java.sql.SQLFeatureNotSupportedException; - - import com.mysql.jdbc.ExceptionInterceptor; - import com.mysql.jdbc.SQLError; -@@ -255,4 +257,14 @@ - protected ExceptionInterceptor getExceptionInterceptor() { - return this.exceptionInterceptor; - } --} -\ No newline at end of file -+ -+ // Java6 build - interface javax.sql.PooledConnection -+ -+ public void addStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void removeStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+} -Index: src/com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.java 2012-04-25 11:15:37.504386174 +0200 -@@ -28,6 +28,7 @@ - import java.sql.ResultSet; - import java.sql.SQLException; - import java.sql.Statement; -+import java.sql.SQLFeatureNotSupportedException; - import java.util.ArrayList; - import java.util.Collections; - import java.util.HashMap; -@@ -35,6 +36,7 @@ - import java.util.Map; - - import javax.sql.XAConnection; -+import javax.sql.StatementEventListener; - import javax.transaction.xa.XAException; - import javax.transaction.xa.XAResource; - import javax.transaction.xa.Xid; -@@ -672,4 +674,14 @@ - - return connToWrap; - } -+ -+ // Java6 build - interface javax.sql.PooledConnection -+ -+ public void addStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void removeStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.java 2012-04-25 11:15:37.504386174 +0200 -@@ -42,6 +42,12 @@ - import java.sql.SQLException; - import java.sql.Time; - import java.sql.Timestamp; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.SQLClientInfoException; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.Struct; -+import java.sql.RowId; - import java.util.Calendar; - - import com.mysql.jdbc.SQLError; -@@ -1224,4 +1230,86 @@ - // public Object unwrap(Class arg0) throws SQLException { - // throw SQLError.notImplemented(); - // } -+ -+ // Java6 build - interface java.sql.PreparedStatement -+ -+ public void setRowId(int parameterIndex, RowId x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNString(int parameterIndex, String value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(int parameterIndex, NClob value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClob(int parameterIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setNClob(int parameterIndex, Reader reader) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java 2012-04-25 11:15:37.505386210 +0200 -@@ -31,6 +31,7 @@ - import java.sql.SQLException; - import java.sql.SQLWarning; - import java.sql.Statement; -+import java.sql.SQLFeatureNotSupportedException; - - import com.mysql.jdbc.SQLError; - import com.mysql.jdbc.Util; -@@ -866,4 +867,26 @@ - checkAndFireConnectionError(sqlEx); - } - } -+ -+ // Java6 build - interface java.sql.Statement -+ -+ public boolean isClosed() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setPoolable(boolean poolable) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isPoolable() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } - } -Index: src/com/mysql/jdbc/jdbc2/optional/SuspendableXAConnection.java -=================================================================== ---- src/com/mysql/jdbc/jdbc2/optional/SuspendableXAConnection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/jdbc2/optional/SuspendableXAConnection.java 2012-04-25 11:15:37.505386210 +0200 -@@ -33,6 +33,8 @@ - import java.util.Map; - - import javax.sql.XAConnection; -+import javax.sql.StatementEventListener; -+import java.sql.SQLFeatureNotSupportedException; - import javax.transaction.xa.XAException; - import javax.transaction.xa.XAResource; - import javax.transaction.xa.Xid; -@@ -209,4 +211,14 @@ - this.currentXAConnection.close(); - } - } -+ -+ // Java6 build - interface javax.sql.PooledConnection -+ -+ public void addStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void removeStatementEventListener(StatementEventListener listener) { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } - } -Index: src/com/mysql/jdbc/Connection.java -=================================================================== ---- src/com/mysql/jdbc/Connection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/Connection.java 2012-04-25 11:19:08.912969654 +0200 -@@ -405,4 +405,7 @@ - * @return - */ - public boolean isServerLocal() throws SQLException; -+ -+ /* java6 compatibility - from java.sql.Wrapper*/ -+ public abstract T unwrap(Class iface) throws SQLException; - } -Index: src/com/mysql/jdbc/LoadBalancedMySQLConnection.java -=================================================================== ---- src/com/mysql/jdbc/LoadBalancedMySQLConnection.java.orig 2012-04-02 10:14:19.000000000 +0200 -+++ src/com/mysql/jdbc/LoadBalancedMySQLConnection.java 2012-04-25 12:16:57.708906161 +0200 -@@ -29,6 +29,12 @@ - import java.sql.SQLWarning; - import java.sql.Savepoint; - import java.sql.Statement; -+import java.sql.Struct; -+import java.sql.SQLFeatureNotSupportedException; -+import java.sql.SQLClientInfoException; -+import java.sql.NClob; -+import java.sql.SQLXML; -+import java.sql.RowId; - import java.util.Calendar; - import java.util.List; - import java.util.Map; -@@ -2562,4 +2568,60 @@ - public String getDefaultAuthenticationPlugin() { - return getActiveMySQLConnection().getDefaultAuthenticationPlugin(); - } -+ -+ // Java6 build - interface java.sql.Connection -+ -+ public Clob createClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Blob createBlob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public NClob createNClob() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public SQLXML createSQLXML() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isValid(int timeout) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public void setClientInfo(String name, String value) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public void setClientInfo(Properties properties) throws SQLClientInfoException { -+ throw new RuntimeException("SQLFeatureNotSupported"); -+ } -+ -+ public String getClientInfo(String name) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Properties getClientInfo() throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ public T unwrap(java.lang.Class iface) throws java.sql.SQLException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ - } -Index: src/com/mysql/jdbc/Util.java -=================================================================== ---- src/com/mysql/jdbc/Util.java.orig 2012-04-25 11:15:50.608856591 +0200 -+++ src/com/mysql/jdbc/Util.java 2012-04-27 11:34:31.308902536 +0200 -@@ -475,6 +475,27 @@ - - return null; - } -+ -+ /** -+ * Reflexive access on JDK-1.5's Class.cast() method so we don't have to -+ * move that out into separate classes built for JDBC-4.0. -+ * -+ * @param invokeOn -+ * @param toCast -+ * @return -+ */ -+ public static T cast(Class invokeOn, Object toCast) { -+ if (CAST_METHOD != null) { -+ try { -+ //XXX: we know that we have cast method, so we don't need add an another layer -+ return invokeOn.cast(CAST_METHOD.invoke(invokeOn, new Object[] { toCast })); -+ } catch (Throwable t) { -+ return null; -+ } -+ } -+ -+ return null; -+ } - - public static long getCurrentTimeNanosOrMillis() { - if (systemNanoTimeMethod != null) { -@@ -609,4 +630,4 @@ - return extensionList; - } - --} -\ No newline at end of file -+} diff --git a/mysql-connector-java-suse-docs.patch b/mysql-connector-java-suse-docs.patch deleted file mode 100644 index 63fa45f..0000000 --- a/mysql-connector-java-suse-docs.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: mysql-connector-java-5.1.19/README.txt -=================================================================== ---- mysql-connector-java-5.1.19.orig/README.txt 2012-04-02 10:14:19.000000000 +0200 -+++ mysql-connector-java-5.1.19/README.txt 2012-05-04 14:46:08.868387250 +0200 -@@ -48,12 +48,11 @@ - * Third-Party Component Notices - - DOCUMENTATION LOCATION -- --The documentation formerly contained in this file has moved --into the 'doc' directory, where it is available in HTML, PDF --and plaintext forms. - --You may also find the latest copy of the documentation on -+Due the license issues SUSE is no longer beeing able to redistribute the -+documentation. -+ -+You may find the latest copy of the documentation on - the MySQL website at - http://dev.mysql.com/doc/refman/5.1/en/connector-j.html - diff --git a/mysql-connector-java.changes b/mysql-connector-java.changes index 1936714..a5b9042 100644 --- a/mysql-connector-java.changes +++ b/mysql-connector-java.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 18 13:16:57 UTC 2012 - mvyskocil@suse.cz + +- fix a build with jdk7 (build jdbc 3.0 with gcj) +- remove some obsoleted macros (gcj, jboss) +- remove jars from source file as well + ------------------------------------------------------------------- Fri May 4 12:48:41 UTC 2012 - mvyskocil@suse.cz diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index a8b316a..209e1b2 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -17,45 +17,45 @@ # icecream 0 -%define section free -%define builddir build-mysql-jdbc -%define distdir dist-mysql-jdbc -%define with_jboss4 0 - Name: mysql-connector-java +Version: 5.1.19 +Release: 0 Summary: Official JDBC Driver for MySQL License: GPL-2.0+ Group: Development/Libraries/Java -Version: 5.1.19 -Release: 0 +Url: http://www.mysql.com/downloads/api-jdbc-stable.html + # 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 %{name}-%{version}/%{name}-%{version}-bin.jar +# rm -rf %{name}-%{version}/docs +# find %{name}-%{version} -name '*jar' -delete # tar -xJf %{name}-%{version}-suse.tar.xz Source0: %{name}-%{version}-suse.tar.xz -Patch2: %{name}-5.1.6-java6-compatibility.patch -Patch3: %{name}-5.1.6-disableJDBC4.patch -#PATCH-FIX-SUSE: inform users about fact the documentation is not distributed anymore -Patch4: mysql-connector-java-suse-docs.patch -Url: http://www.mysql.com/downloads/api-jdbc-stable.html +# Patch to build with JDBC 4.1/Java 7 +Patch0: mysql-connector-java-5.1.19-java7.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch + BuildRequires: ant BuildRequires: ant-contrib BuildRequires: apache-commons-logging +BuildRequires: java-1_5_0-gcj-compat-devel BuildRequires: java-devel +BuildRequires: jta +BuildRequires: junit BuildRequires: slf4j #!BuildIgnore: maven2-bootstrap -%if %{with_jboss4} -BuildRequires: jboss4-common -BuildRequires: jboss4-connector -%endif -BuildRequires: jpackage-utils -BuildRequires: junit BuildRequires: log4j-mini + +Requires: jta >= 1.0 Requires: log4j +Requires: slf4j + Provides: mm.mysql = %{version} Obsoletes: mm.mysql < %{version} + # manual is no longer distributed Provides: %{name}-manual = %{version} Obsoletes: %{name}-manual < %{version} @@ -71,18 +71,7 @@ set that supports the capabilities of MySQL. %prep %setup -q -n %{name}-%{version} -# patch only for javac 1.6.0 -if [[ "$(javac -version 2>&1 | grep '1\.6\.0')" != "" ]]; then -%patch2 -b .sav2 -fi -%patch3 -%patch4 -p1 -# remove all binary libs -find . \( -name "*.jar" -o -name "*.class" \) | xargs -t %{__rm} -f -%if ! %{with_jboss4} -rm -r src/com/mysql/jdbc/integration/jboss/ -rm -r src/testsuite/regression/DataSourceRegressionTest.java -%endif +%patch0 -p1 # dup rm -f README @@ -90,34 +79,38 @@ rm -f README sed -i -e 's/.$//' README.txt %build -# jboss jars needed for test suite -export CLASSPATH="$(build-classpath ant-contrib \ - commons-logging slf4j \ -%if %{with_jboss4} - jboss4/jboss-common-jdbc-wrapper \ -%endif - jdbc-stdext jta \ - junit log4j xml-commons-jaxp-1.3-apis)" -ant -Dant.build.javac.source=1.6 \ - -Dant.build.javac.target=1.6 \ - -DbuildDir="%{builddir}" \ - -DdistDir="%{distdir}" \ + +# 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 + +export CLASSPATH=$(build-classpath \ + ant-contrib \ + commons-logging \ + slf4j \ + jdbc-stdext\ + 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 -DbuildDir=build-mysql-jdbc \ + -DdistDir=dist-mysql-jdbc \ -Dcom.mysql.jdbc.java6.javac="%{javac}" \ - -Dcom.mysql.jdbc.java6.rtjar="%{java_home}/jre/lib/rt.jar" \ - dist + -Dcom.mysql.jdbc.java6.java="%{java}" \ + -Dcom.mysql.jdbc.java6.rtjar"=%{java_home}/jre/lib/rt.jar" %install install -d -m 755 %{buildroot}%{_javadir} install ./build-mysql-jdbc/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT-bin.jar \ - %{buildroot}%{_javadir}/%{name}-%{version}.jar + %{buildroot}%{_javadir}/%{name}.jar -( - cd %{buildroot}%{_javadir} && \ - for jar in *-%{version}*.jar; do - %{__ln_s} -f ${jar} `echo $jar | %{__sed} "s|-%{version}||g"` - done -) rm -rf %{buildroot}%{name}-%{version}/docs/release-test-output # Install the Maven build information @@ -127,13 +120,19 @@ sed -i 's/>@.*%{version}