From aed2c5b70dde2fe2cef79445005b3dcb3727b5fd Mon Sep 17 00:00:00 2001 From: prabatuty Date: Mon, 9 Jun 2008 07:15:19 +0000 Subject: [PATCH] 1988649 with jdk 1.6 build fails Adding dummy implementation for all new methods in jdk 1.6 java.sql.* interfaces --- src/jdbc/JdbcSqlConnection.java | 63 +++++++ src/jdbc/JdbcSqlPreparedStatement.java | 91 ++++++++++ src/jdbc/JdbcSqlResultSet.java | 315 +++++++++++++++++++++++++++++---- src/jdbc/JdbcSqlResultSetMetaData.java | 10 ++ src/jdbc/JdbcSqlStatement.java | 32 +++- src/odbc/Makefile | 18 +- src/server/HashIndex.cxx | 2 - src/server/TableImpl.cxx | 3 +- 8 files changed, 477 insertions(+), 57 deletions(-) diff --git a/src/jdbc/JdbcSqlConnection.java b/src/jdbc/JdbcSqlConnection.java index e18b5759..62df8fdd 100644 --- a/src/jdbc/JdbcSqlConnection.java +++ b/src/jdbc/JdbcSqlConnection.java @@ -11,6 +11,14 @@ import java.lang.String; import java.util.LinkedList; import java.util.ListIterator; import java.util.Map; +import java.util.Properties; + +import java.sql.Clob; +import java.sql.NClob; +import java.sql.Blob; +import java.sql.SQLXML; +import java.sql.Struct; +import java.sql.Array; public final class JdbcSqlConnection extends JSqlError implements Connection, JSqlErrorType { @@ -300,4 +308,59 @@ public final class JdbcSqlConnection extends JSqlError implements Connection, JS { throw getException(CSQL_NOT_SUPPORTED); } + //Java 1.6 methods + public Struct createStruct(String typeName, Object[] attributes) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Array createArrayOf(String typeName, Object[] elements) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Blob createBlob() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Clob createClob() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public NClob createNClob() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public SQLXML createSQLXML() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Properties getClientInfo() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public String getClientInfo(String name) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setClientInfo(String name , String value) + { + return; + } + public void setClientInfo(Properties properties) + { + return; + } + public boolean isValid(int timeout) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public boolean isWrapperFor(Class ifact) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Class unwrap(Class iface) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } } diff --git a/src/jdbc/JdbcSqlPreparedStatement.java b/src/jdbc/JdbcSqlPreparedStatement.java index 9e152382..e2d4277d 100644 --- a/src/jdbc/JdbcSqlPreparedStatement.java +++ b/src/jdbc/JdbcSqlPreparedStatement.java @@ -16,6 +16,10 @@ import java.sql.ParameterMetaData; import java.sql.SQLException; import java.sql.Ref; import java.sql.Array; +import java.sql.SQLXML; +import java.sql.RowId; + +import java.sql.NClob; public final class JdbcSqlPreparedStatement extends JdbcSqlStatement implements PreparedStatement { @@ -232,5 +236,92 @@ public final class JdbcSqlPreparedStatement extends JdbcSqlStatement { throw getException(CSQL_NOT_SUPPORTED); } + //java 1.6 methods + public void setBlob(int paramIndex, InputStream value ) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setBlob(int paramIndex, InputStream value, long length ) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setClob(int paramIndex, Reader value ) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setClob(int paramIndex, Reader value, long length ) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNCharacterStream(int paramIndex, Reader value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNCharacterStream(int paramIndex,Reader value,long length) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNClob(int paramIndex, NClob value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNClob(int paramIndex, Reader value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNClob(int paramIndex, Reader value, long length) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setNString(int paramIndex, String value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setCharacterStream(int param, Reader reader) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setCharacterStream(int param, Reader reader, long length) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setBinaryStream(int parameterIndex, InputStream value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setBinaryStream(int parameterIndex, InputStream value, long length) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setAsciiStream(int parameterIndex, InputStream value) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setAsciiStream(int parameterIndex, InputStream value, long length) + throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setSQLXML(int paramIndex, SQLXML xmlObj) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public void setRowId(int paramIndex, RowId x) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + + } diff --git a/src/jdbc/JdbcSqlResultSet.java b/src/jdbc/JdbcSqlResultSet.java index 9a54f77d..bc49b57f 100644 --- a/src/jdbc/JdbcSqlResultSet.java +++ b/src/jdbc/JdbcSqlResultSet.java @@ -21,33 +21,39 @@ import java.sql.Ref; import java.sql.Array; import java.sql.Types; +import java.sql.RowId; +import java.sql.SQLXML; +import java.io.Reader; +import java.sql.NClob; +import java.sql.Wrapper; + public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorType { public JdbcSqlStatement stmt; // This guy creates me public JdbcSqlResultSetMetaData rsmd; - public boolean isClosed; + public boolean closedFlag; long curRow; JdbcSqlResultSet() { rsmd = new JdbcSqlResultSetMetaData(); - isClosed = false; + closedFlag = false; curRow = -1; } void setStmt( JdbcSqlStatement jdbcStmt ) { stmt = jdbcStmt; rsmd.setStmt( jdbcStmt ); - isClosed = false; + closedFlag = false; curRow = -1; } protected void finalize () { try { - if(!isClosed) close(); + if(!closedFlag) close(); } catch(SQLException e) { @@ -58,9 +64,9 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // API's public void close() throws SQLException { - if( isClosed ) return; + if( closedFlag ) return; - isClosed = true; + closedFlag = true; curRow = -1; //rsmd.close(); //commented by praba //after close the app can reexecute. @@ -71,7 +77,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // Move to next tuple public boolean next () throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); if( 0 == stmt.jniStmt.next() ) { @@ -84,7 +90,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public ResultSetMetaData getMetaData () throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( rsmd ); } public SQLWarning getWarnings() throws SQLException @@ -97,7 +103,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public int findColumn (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); int colnum = stmt.jniStmt.findColumn( colName ); return( colnum ); @@ -112,12 +118,12 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public Statement getStatement() throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( stmt ); } public boolean isFirst() throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); if( curRow == 0 ) return( true ); @@ -126,7 +132,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public boolean isBeforeFirst() throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); if( curRow == -1 ) return( true ); @@ -135,7 +141,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public boolean isAfterLast() throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); if( curRow == -2 ) return( true ); @@ -147,7 +153,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // SHORT public short getShort (int colNum ) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); short out = stmt.jniStmt.getShort( colNum - 1 ); if( false ) throw new SQLException(); @@ -155,14 +161,14 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public short getShort (String colName ) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getShort( findColumn( colName ) ) ); } // INTEGER public int getInt (int colNum ) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); int out = stmt.jniStmt.getInt( colNum - 1 ); if( false ) throw new SQLException(); @@ -170,14 +176,14 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public int getInt (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getInt( findColumn( colName ) ) ); } // LONG public long getLong (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); long out = stmt.jniStmt.getLong( colNum-1 ); if( false ) throw new SQLException(); @@ -185,14 +191,14 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public long getLong (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getLong( findColumn( colName ) ) ); } // BYTE public byte getByte (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); byte out = stmt.jniStmt.getByte( colNum-1 ); if( false ) throw new SQLException(); @@ -200,14 +206,14 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public byte getByte (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getByte( findColumn( colName ) ) ); } // FLOAT public float getFloat (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); float out = stmt.jniStmt.getFloat( colNum-1 ); if( false ) throw new SQLException(); @@ -215,14 +221,14 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public float getFloat (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getFloat( findColumn( colName ) ) ); } // DOUBLE public double getDouble (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); double out = stmt.jniStmt.getDouble( colNum-1 ); if( false ) throw new SQLException(); @@ -230,7 +236,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public double getDouble (String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getDouble( findColumn( colName ) ) ); } @@ -238,7 +244,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT public BigDecimal getBigDecimal( int colNum ) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); throw getException( CSQL_NOT_SUPPORTED ); @@ -249,7 +255,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT public BigDecimal getBigDecimal(String colName) throws SQLException { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); return( getBigDecimal( findColumn( colName ) ) ); } public BigDecimal getBigDecimal (int colNum, int scale) @@ -266,7 +272,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // STRING/VARSTRING public String getString(int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); // Get value String out = stmt.jniStmt.getString( colNum-1 ); @@ -279,7 +285,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT } public InputStream getAsciiStream(int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); String out = stmt.jniStmt.getString( colNum-1 ); @@ -292,7 +298,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT public java.io.Reader getCharacterStream(int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); InputStream iS = getAsciiStream( colNum ); if( iS == null ) @@ -309,7 +315,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // BOOLEAN public boolean getBoolean (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); boolean out = stmt.jniStmt.getBoolean( colNum-1 ); @@ -323,7 +329,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // BINARY/VARBINARY public byte [] getBytes(int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); throw getException( CSQL_NOT_SUPPORTED ); //byte[] out = stmt.jniStmt.getBytes( colNum-1 ); @@ -337,7 +343,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // DATE public java.sql.Date getDate (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); java.sql.Date out = stmt.jniStmt.getDate( colNum-1 ); @@ -361,7 +367,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // TIME public java.sql.Time getTime (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); // Get value java.sql.Time out = stmt.jniStmt.getTime( colNum-1 ); @@ -387,7 +393,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT public java.sql.Timestamp getTimestamp (int colNum) throws SQLException { - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); java.sql.Timestamp out = stmt.jniStmt.getTimestamp( colNum-1 ); @@ -413,7 +419,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT { Object obj = new String("no obj"); - if( isClosed || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag || curRow < 0 ) throw getException( CSQL_INVALID_STATE ); switch ( rsmd.getColumnType( colNum ) ) { @@ -484,7 +490,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT // UN-SUPPORTED API's public boolean wasNull () throws SQLException // TODO { - if( isClosed ) throw getException( CSQL_INVALID_STATE ); + if( closedFlag ) throw getException( CSQL_INVALID_STATE ); throw getException( CSQL_NOT_SUPPORTED ); //return( stmt.jniStmt.wasNull() ); } @@ -795,7 +801,7 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT throw getException( CSQL_NOT_SUPPORTED ); } public void updateObject(String colName, Object x, int scale) - throws SQLException + throws SQLException { throw getException( CSQL_NOT_SUPPORTED ); } @@ -849,4 +855,237 @@ public class JdbcSqlResultSet extends JSqlError implements ResultSet, JSqlErrorT { throw getException( CSQL_NOT_SUPPORTED ); } + //java 1.6 methods + public void updateRowId(int colIndex, RowId x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateRowId(String colLabel, RowId x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateSQLXML(int colIndex, SQLXML x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateSQLXML(String colLabel, SQLXML x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(int colIndex, NClob x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(int colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(int colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(String colIndex, NClob x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(String colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNClob(String colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNString(int colIndex, String x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNString(String colIndex, String x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNCharacterStream(int colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNCharacterStream(int colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNCharacterStream(String colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateNCharacterStream(String colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateCharacterStream(int colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateCharacterStream(String colIndex, Reader x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateCharacterStream(int colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateCharacterStream(String colIndex, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBinaryStream(int colIndex, InputStream x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBinaryStream(String colIndex, InputStream x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBinaryStream(int colIndex, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBinaryStream(String colIndex, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateAsciiStream(int colIndex, InputStream x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateAsciiStream(String colIndex, InputStream x) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateAsciiStream(int colIndex, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateAsciiStream(String colIndex, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateClob(int colNum, Reader x) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateClob(String colNum, Reader x) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateClob(int colNum, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateClob(String colNum, Reader x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBlob(int colNum, InputStream x) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBlob(String colNum, InputStream x) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBlob(int colNum, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public void updateBlob(String colNum, InputStream x, long length) + throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public Reader getNCharacterStream(int colIndex) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public Reader getNCharacterStream(String colLabel) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public NClob getNClob(int colIndex) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public NClob getNClob(String colLabel) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public String getNString(int colIndex) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public String getNString(String colLabel) throws SQLException + { + throw getException( CSQL_NOT_SUPPORTED ); + } + public SQLXML getSQLXML(int colIndex) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public SQLXML getSQLXML(String colLabel) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public boolean isClosed() + { + return closedFlag; + } + public int getHoldability() throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public RowId getRowId(int val) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public RowId getRowId(String val) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public boolean isWrapperFor(Class ifact) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Class unwrap(Class iface) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } } diff --git a/src/jdbc/JdbcSqlResultSetMetaData.java b/src/jdbc/JdbcSqlResultSetMetaData.java index 6ba2936d..29a04134 100644 --- a/src/jdbc/JdbcSqlResultSetMetaData.java +++ b/src/jdbc/JdbcSqlResultSetMetaData.java @@ -140,4 +140,14 @@ extends JSqlError implements ResultSetMetaData, JSqlErrorType { return( true ); } + //java 1.6 methods + public boolean isWrapperFor(Class ifact) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Class unwrap(Class iface) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + } diff --git a/src/jdbc/JdbcSqlStatement.java b/src/jdbc/JdbcSqlStatement.java index 5dabe6a8..ec717447 100644 --- a/src/jdbc/JdbcSqlStatement.java +++ b/src/jdbc/JdbcSqlStatement.java @@ -7,7 +7,7 @@ import java.sql.SQLWarning; public class JdbcSqlStatement extends JSqlError implements Statement, JSqlErrorType { - public boolean isClosed; + public boolean closedFlag; public boolean isPrepared; public int rowsAffect; public JSqlStatement jniStmt; @@ -20,7 +20,7 @@ public class JdbcSqlStatement extends JSqlError implements Statement, JSqlErrorT conn = (JdbcSqlConnection) con; jniStmt.alloc(conn.mode); jniStmt.setConnectionPtr( conn.getConnection().getPtr() ); - isClosed = false; + closedFlag = false; isPrepared = false; rowsAffect = 0; rs = new JdbcSqlResultSet(); @@ -29,7 +29,7 @@ public class JdbcSqlStatement extends JSqlError implements Statement, JSqlErrorT { try { - if(!isClosed) + if(!closedFlag) close(); jniStmt.free();//praba } @@ -69,14 +69,14 @@ public class JdbcSqlStatement extends JSqlError implements Statement, JSqlErrorT public void close() throws SQLException { - if(isClosed) return; + if(closedFlag) return; if(isPrepared) { if(jniStmt.isSelect() ) rs.close(); jniStmt.freeStmt(); //jniStmt.free(); Praba. this makes the stmt unusable after close } - isClosed = true; + closedFlag = true; return; } @@ -251,6 +251,26 @@ public class JdbcSqlStatement extends JSqlError implements Statement, JSqlErrorT { throw getException(CSQL_NOT_SUPPORTED); } - + //java 1.6 methods + public boolean isPoolable() + { + return false; + } + public void setPoolable(boolean pool) + { + return; + } + public boolean isWrapperFor(Class ifact) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public Class unwrap(Class iface) throws SQLException + { + throw getException(CSQL_NOT_SUPPORTED); + } + public boolean isClosed() + { + return closedFlag; + } } diff --git a/src/odbc/Makefile b/src/odbc/Makefile index acce8948..98976100 100644 --- a/src/odbc/Makefile +++ b/src/odbc/Makefile @@ -77,14 +77,14 @@ HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run aclocal-1.9 +ACLOCAL = ${SHELL} /home/csql/latest/csql/missing --run aclocal-1.9 AMDEP_FALSE = # AMDEP_TRUE = -AMTAR = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run tar +AMTAR = ${SHELL} /home/csql/latest/csql/missing --run tar AR = ar -AUTOCONF = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run autoconf -AUTOHEADER = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run autoheader -AUTOMAKE = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run automake-1.9 +AUTOCONF = ${SHELL} /home/csql/latest/csql/missing --run autoconf +AUTOHEADER = ${SHELL} /home/csql/latest/csql/missing --run autoheader +AUTOMAKE = ${SHELL} /home/csql/latest/csql/missing --run automake-1.9 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -94,7 +94,7 @@ CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -I/home/praba/csql/jdk1.5.0_14/include -I/home/praba/csql/jdk1.5.0_14/include/linux +CXXFLAGS = -g -I/opt/java/jdk1.6.0_04/include -I/opt/java/jdk1.6.0_04/include/linux CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps @@ -120,7 +120,7 @@ LIBS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /home/praba/csql/latest/csqlmy/csql/missing --run makeinfo +MAKEINFO = ${SHELL} /home/csql/latest/csql/missing --run makeinfo OBJEXT = o PACKAGE = csql PACKAGE_BUGREPORT = @@ -167,7 +167,7 @@ host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = /home/praba/csql/latest/csqlmy/csql/install-sh +install_sh = /home/csql/latest/csql/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale @@ -176,7 +176,7 @@ mandir = ${datarootdir}/man mkdir_p = mkdir -p -- oldincludedir = /usr/include pdfdir = ${docdir} -prefix = /home/praba/csql/latest/csqlmy/csql/install +prefix = /home/csql/latest/csql/install program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin diff --git a/src/server/HashIndex.cxx b/src/server/HashIndex.cxx index 198d34b4..0d04278e 100644 --- a/src/server/HashIndex.cxx +++ b/src/server/HashIndex.cxx @@ -207,7 +207,6 @@ DbRetVal HashIndex::insert(TableImpl *tbl, Transaction *tr, void *indexPtr, Inde rc = list.insert((Chunk*)iptr->hashNodeChunk_, tbl->db_, keyPtr, tuple); if (rc !=OK) { bucket->mutex_.releaseLock(tbl->db_->procSlot); - printf("PRABA::bucket insert failed here with rc %d\n", rc); return rc; } @@ -265,7 +264,6 @@ DbRetVal HashIndex::remove(TableImpl *tbl, Transaction *tr, void *indexPtr, Inde if (SplCase == rc) { printDebug(DM_HashIndex, "Removing hash index node from head with only none node"); - printError(ErrWarning, "Removing hash index node from head with only none node"); bucket1->bucketList_ = 0; rc = OK; } diff --git a/src/server/TableImpl.cxx b/src/server/TableImpl.cxx index 612dc040..0b7ebbce 100644 --- a/src/server/TableImpl.cxx +++ b/src/server/TableImpl.cxx @@ -385,8 +385,7 @@ DbRetVal TableImpl::insertTuple() lMgr_->releaseLock(tptr); (*trans)->removeFromHasList(db_, tptr); ((Chunk*)chunkPtr_)->free(db_, tptr); - //TMP::remove int derefernce - printError(ret, "PRABA:::Unable to insert index node for tuple %x %d", tptr, *(int*)tptr); + printError(ret, "Unable to insert index node for tuple %x", tptr); return ret; } } -- 2.11.4.GIT