rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
SQLState.LANG_STRING_TRUNCATION, TypeId.CLOB_NAME, "XXXX", String.valueOf(valueLength))); | SQLState.SET_STREAM_INEXACT_LENGTH_DATA), SQLState.SET_STREAM_INEXACT_LENGTH_DATA); } else { if (canTruncate()) { truncate(); } else { throw new DerbyIOException( MessageService.getTextMessage( SQLState.LANG_STRING_TRUNCATION), SQLState.LANG_STRING_TRUNCATION); | private void checkSufficientData() throws IOException { // now that we finished reading from the stream; the amount // of data that we can insert,start check for trailing spaces if (charsToTruncate > 0) { reader.setLimit(charsToTruncate); int c = 0; for (;;) ... |
} int remainingBytes = reader.clearLimit(); if (remainingBytes > 0) throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INEXACT_LENGTH_DATA)); if (remainingBytes == 0) { int c; try { c = reader.read(); } catch (IOException ioe) { c = -1; } if (c >= 0) throw new IOException(MessageService.getT... | private void checkSufficientData() throws IOException { // now that we finished reading from the stream; the amount // of data that we can insert,start check for trailing spaces if (charsToTruncate > 0) { reader.setLimit(charsToTruncate); int c = 0; for (;;) ... | |
TestSuite suite = new TestSuite( "PreparedStatementTest and SetObjectUnsupportedTest suite"); suite.addTestSuite(PreparedStatementTest.class); suite.addTest(SetObjectUnsupportedTest.suite(false)); return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { create(); } catch (SQLExceptio... | TestSuite suite = new TestSuite("PreparedStatementTest suite"); suite.addTest(baseSuite("PreparedStatementTest:embedded")); suite.addTest(TestConfiguration.clientServerDecorator( baseSuite("PreparedStatementTest:client"))); return suite; | public static Test suite() { TestSuite suite = new TestSuite( "PreparedStatementTest and SetObjectUnsupportedTest suite"); suite.addTestSuite(PreparedStatementTest.class); suite.addTest(SetObjectUnsupportedTest.suite(false)); return new BaseJDBCTestSetup(suite) { ... |
scoped = false; | public void init(Object andNode, Object referencedSet) { this.andNode = (AndNode) andNode; pushable = false; this.referencedSet = (JBitSet) referencedSet; } | |
return "referencedSet: " + referencedSet + "\n" + "pushable: " + pushable + "\n" + | return binaryRelOpColRefsToString() + "\nreferencedSet: " + referencedSet + "\n" + "pushable: " + pushable + "\n" + | public String toString() { if (SanityManager.DEBUG) { return "referencedSet: " + referencedSet + "\n" + "pushable: " + pushable + "\n" + super.toString(); } else { return ""; } } |
case DependencyManager.REVOKE_EXECUTE_PRIVILEGE: | public void prepareToInvalidate ( Provider p, int action, LanguageConnectionContext lcc ) throws StandardException { switch (action) { /* ** We are only dependent on the underlying ** table, and our spses. (we should be ** dropped before our table is dropped). */ case DependencyManage... | |
columnList[ SYSTABLEPERMS_TABLEPERMSID - 1] = new SystemColumnImpl( convertIdCase( "TABLEPERMSID"), SYSTABLEPERMS_TABLEPERMSID, 0, 0, false, "CHAR", true, 36); | public SystemColumn[] buildColumnList() { if (columnList == null) { columnList = new SystemColumn[ COLUMN_COUNT]; columnList[ GRANTEE_COL_NUM - 1] = new SystemColumnImpl( convertIdCase( "GRANTEE"), GRANTEE_COL_NUM, ... | |
grantee = getAuthorizationID( tpd.getGrantee()); | oid = tpd.getUUID(); if ( oid == null ) { oid = getUUIDFactory().createUUID(); tpd.setUUID(oid); } tablePermID = oid.toString(); grantee = getAuthorizationID( tpd.getGrantee()); | public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException { DataValueDescriptor grantee = null; DataValueDescriptor grantor = null; String tableID = null; String selectPriv = null; String deletePriv = null; String insertPriv = null; Str... |
row.setColumn( SYSTABLEPERMS_TABLEPERMSID, dvf.getCharDataValue(tablePermID)); | public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException { DataValueDescriptor grantee = null; DataValueDescriptor grantor = null; String tableID = null; String selectPriv = null; String deletePriv = null; String insertPriv = null; Str... | |
public SystemColumn[] buildColumnList() { SystemColumn[] columnList = new SystemColumn[SYSALIASES_COLUMN_COUNT]; columnList[0] = new SystemColumnImpl( convertIdCase( "ALIASID"), 1, 0, 0, false, "CHAR", true, 36 ); columnList[1] = new SystemColumnImpl( convertIdCase( "ALIAS"), 2, false ); columnList[2] = new Syst... | public SystemColumn[] buildColumnList() { return new SystemColumn[] { SystemColumnImpl.getUUIDColumn("ALIASID", false), SystemColumnImpl.getIdentifierColumn("ALIAS", false), SystemColumnImpl.getUUIDColumn("SCHEMAID", true), SystemColumnImpl.getColumn("JAVACLASSNAME", java.sql.Types.LONGVARCHAR, false, Integer.MAX_VA... | public SystemColumn[] buildColumnList() { SystemColumn[] columnList = new SystemColumn[SYSALIASES_COLUMN_COUNT]; // describe columns columnList[0] = new SystemColumnImpl( convertIdCase( "ALIASID"), // column name 1, // column number 0, // precision 0, // scale false, ... |
int length, | final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, ... | |
if (netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRIDDTA || netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRPWDDTA) { writeEncryptedScalarStream(chained, chainedWithSameCorrelator, codePoint, length, in, writeNullByte, parameterIndex); }else{ writePlainS... | writePlainScalarStream(chained, chainedWithSameCorrelator, codePoint, in, writeNullByte, parameterIndex); | final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, ... |
int length) throws SQLException { | long length) throws SQLException { | public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { checksBeforeUpdateXXX("updateAsciiStream", columnIndex); int colType = getColumnType(columnIndex); switch (colType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: bre... |
int length) throws SQLException { | long length) throws SQLException { | public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { checksBeforeUpdateXXX("updateBinaryStream", columnIndex); int colType = getColumnType(columnIndex); switch (colType) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB... |
int length) throws SQLException { | long length) throws SQLException { | public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { //If the column type is the right datatype, this method will eventually call getDVDforColumnToBeUpdated which will check for //the read only resultset. But for other datatypes, we want to catch if this updateChar... |
rs.updateBigDecimal(1, rs1.getBigDecimal(updateXXXName)); else rs.updateBigDecimal(ColumnNames[0], rs1.getBigDecimal(updateXXXName)); | BigDecimalHandler.updateBigDecimalString(rs, 1, BigDecimalHandler.getBigDecimalString(rs1, updateXXXName)); else BigDecimalHandler.updateBigDecimalString(rs, ColumnNames[0], BigDecimalHandler.getBigDecimalString(rs1, updateXXXName)); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if (indexOrName == 1) rs.updateBigDecimal(sqlType, rs1.getBigDecimal(updateXXXName)); else rs.updateBigDecimal(ColumnNames[sqlType-1], rs1.getBigDecimal(updateXXXName)); | if(HAVE_BIG_DECIMAL) { if (indexOrName == 1) rs.updateBigDecimal(sqlType, rs1.getBigDecimal(updateXXXName)); else rs.updateBigDecimal(ColumnNames[sqlType-1], rs1.getBigDecimal(updateXXXName)); } | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
System.out.println(displayString + " BigDecimal object as parameters"); if (indexOrName == 1) rs.updateObject(sqlType, rs1.getBigDecimal(updateXXXName)); else rs.updateObject(ColumnNames[sqlType-1], rs1.getBigDecimal(updateXXXName)); | if(HAVE_BIG_DECIMAL) { System.out.println(displayString + " BigDecimal object as parameters"); if (indexOrName == 1) rs.updateObject(sqlType, rs1.getBigDecimal(updateXXXName)); else rs.updateObject(ColumnNames[sqlType-1],rs1.getBigDecimal(updateXXXName)); } | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
BigDecimal bd = rs.getBigDecimal(4); rs.updateBigDecimal(4, rs1.getBigDecimal(4)); if(rs.getBigDecimal(4).compareTo(rs1.getBigDecimal(4)) != 0) | String bdString = BigDecimalHandler.getBigDecimalString(rs, 4); BigDecimalHandler.updateBigDecimalString(rs, 4, BigDecimalHandler.getBigDecimalString(rs1, 4)); if(!BigDecimalHandler.getBigDecimalString(rs,4) .equals(BigDecimalHandler.getBigDecimalString(rs1, 4))) | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if(rs.getBigDecimal(4).compareTo(bd) != 0) | if(!BigDecimalHandler.getBigDecimalString(rs, 4).equals(bdString)) | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if(rs.getBigDecimal(sqlType) != rs1.getBigDecimal(updateXXXName)) { | if(BigDecimalHandler.getBigDecimalString(rs, sqlType) != BigDecimalHandler.getBigDecimalString(rs1, updateXXXName)) { | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { PreparedStatement pstmt1 = conn.prepareStatement("select * from " + checkAgainstTheTable); ResultSet rs1 = pstmt1.executeQuery(); rs1.next(); PreparedStatement pstmt = conn.prepareStatement("select * from A... |
testDerby1080(); | protected void runTest() { // Test cases with get connection via drivermanager and using // different security mechanisms. // Network server supports SECMEC_USRIDPWD, SECMEC_USRIDONL,SECMEC_EUSRIDPWD System.out.println("Checking security mechanism authentication with DriverManager"); // DERBY-300; C... | |
test1(args); | System.out.println("Test testRelative starting"); Connection con = null; try { ij.getPropertyArg(args); con = ij.startJBMS(); test1(con); } catch (Exception e) { unexpectedException(e); } | public static void main(String[] args) { test1(args); } |
public static void test1(String []args) { System.out.println("Test testRelative starting"); try { ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoCommit(false); stmt = con.prepareStatement("create table testRelative(name varchar(10), i int)"); stmt.executeUpdate(); | public static void test1(Connection con) { ResultSet rs = null; PreparedStatement pStmt = null; Statement stmt1 = null; String returnValue = null; try { con.setAutoCommit(false); pStmt = con.prepareStatement("create table testRelative(name varchar(10), i int)"); pStmt.executeUpdate(); | public static void test1(String []args) { System.out.println("Test testRelative starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg... |
dumpSQLExceptions(sqle); | expectedException(sqle, NO_CURRENT_ROW_SQL_STATE); | public static void test1(String []args) { System.out.println("Test testRelative starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg... |
System.out.println("FAIL -- Unexpected Exception: "+ se.getMessage()); | System.out.println("FAIL -- Unexpected Exception: "+ "SQLSTATE(" +se.getSQLState() +")" + se.getMessage()); | static private void unexpectedSQLException(SQLException se) { System.out.println("FAIL -- Unexpected Exception: "+ se.getMessage()); se.printStackTrace(System.out); } |
closeMethodArgument(acb, mb); | private int getJoinArguments(ActivationClassBuilder acb, MethodBuilder mb, ValueNode joinClause) throws StandardException { int numArgs = getNumJoinArguments(); leftResultSet.generate(acb, mb); // arg 1 mb.push(leftResultSet.resultColumns.size()); // arg 2 rightResultSet.generate(acb, mb)... | |
public HashJoinResultSet(NoPutResultSet leftResultSet, | HashJoinResultSet(NoPutResultSet leftResultSet, | public HashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExists... |
String userSuppliedOptimizerOverrides, GeneratedMethod closeCleanup) | String userSuppliedOptimizerOverrides) | public HashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExists... |
optimizerEstimatedCost, userSuppliedOptimizerOverrides, closeCleanup); | optimizerEstimatedCost, userSuppliedOptimizerOverrides); | public HashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExists... |
FromList fromList = (FromList) getNodeFactory().getNode( | getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV); try { FromList fromList = (FromList) getNodeFactory().getNode( | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
DataDictionary dataDictionary = getDataDictionary(); super.bindTables(dataDictionary); if (SanityManager.DEBUG) SanityManager.ASSERT(resultSet != null && resultSet instanceof SelectNode, "Delete must have a select result set"); SelectNode sel; sel = (SelectNode)resultSet; targetTable = (FromTable) sel.fromList.e... | DataDictionary dataDictionary = getDataDictionary(); super.bindTables(dataDictionary); | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
SanityManager.ASSERT(cursorTargetTableName != null); } if (targetTable instanceof FromVTI) { targetVTI = (FromVTI) targetTable; targetVTI.setTarget(); } else { if (targetTableName == null) { | SanityManager.ASSERT(resultSet != null && resultSet instanceof SelectNode, "Delete must have a select result set"); SelectNode sel; sel = (SelectNode)resultSet; targetTable = (FromTable) sel.fromList.elementAt(0); if (targetTable instanceof CurrentOfNode) { currentOfNode = (CurrentOfNode) targetTable; cursorTargetTab... | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
SanityManager.ASSERT(cursorTargetTableName!=null); | SanityManager.ASSERT(cursorTargetTableName != null); } if (targetTable instanceof FromVTI) { targetVTI = (FromVTI) targetTable; targetVTI.setTarget(); } else { if (targetTableName == null) { if (SanityManager.DEBUG) SanityManager.ASSERT(cursorTargetTableName!=null); | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
dependentNodes[i].bind(); } } }else | dependentNodes[i].bind(); } } } else { if(isDependentTable) { String currentTargetTableName = targetTableDescriptor.getSchemaName() + "." + targetTableDescriptor.getName(); graphHashTable.put(currentTargetTableName, new Integer(0)); } } getCompilerContext().pushCurrentPrivType( getPrivType()); getCompilerContext().ad... | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
if(isDependentTable) { String currentTargetTableName = targetTableDescriptor.getSchemaName() + "." + targetTableDescriptor.getName(); graphHashTable.put(currentTargetTableName, new Integer(0)); } | getCompilerContext().popCurrentPrivType(); | public QueryTreeNode bind() throws StandardException { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); ResultColumn rowLocationColumn = null; CurrentRowLocationNode rowLocationNod... |
checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw dataTypeConversion(parameterIndex, "java.io.InputStream(ASCII)"); } | checkCharacterStreamConditions(parameterIndex, "java.io.InputStream(ASCII)"); | public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw dat... |
setCharacterStream(parameterIndex, r, length); | setCharacterStreamInternal(parameterIndex, r, false, length); | public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw dat... |
public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: break; default: throw dataTypeConversi... | public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { checkBinaryStreamConditions(parameterIndex); setBinaryStreamInternal(parameterIndex, x, true, -1); } | public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: break; default: thro... |
long length) | final boolean lengthLess, long length) | private void setBinaryStreamInternal(int parameterIndex, InputStream x, long length) throws SQLException { if ( length < 0 ) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, j... |
if ( length < 0 ) | if ( !lengthLess && length < 0 ) | private void setBinaryStreamInternal(int parameterIndex, InputStream x, long length) throws SQLException { if ( length < 0 ) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, j... |
if ( length > Integer.MAX_VALUE ) { | if ( !lengthLess && length > Integer.MAX_VALUE ) { | private void setBinaryStreamInternal(int parameterIndex, InputStream x, long length) throws SQLException { if ( length < 0 ) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, j... |
getParms().getParameterForSet(parameterIndex - 1).setValue(new RawToBinaryFormatStream(x, (int)length), (int)length); | if (lengthLess) { length = -1; } getParms().getParameterForSet(parameterIndex - 1).setValue( new RawToBinaryFormatStream(x, (int)length), (int)length); | private void setBinaryStreamInternal(int parameterIndex, InputStream x, long length) throws SQLException { if ( length < 0 ) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, j... |
checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } if (colType != Types.BLOB) throw dataTypeConversion(i, "java.sql.Blob"); | checkBlobConditions(i); | public void setBlob (int i, Blob x) throws SQLException { checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2: only allow setBlob on a BLOB column. if (colType != Types.BLOB) thro... |
setBinaryStreamInternal(i, x.getBinaryStream(), streamLength); | setBinaryStreamInternal(i, x.getBinaryStream(), false, streamLength); | public void setBlob (int i, Blob x) throws SQLException { checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2: only allow setBlob on a BLOB column. if (colType != Types.BLOB) thro... |
checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw dataTypeConversion(parameterIndex, "java.io.Reader"); } setCharacterStreamInternal(parameterIndex, reader, length); | checkCharacterStreamConditions(parameterIndex, "java.io.Reader"); setCharacterStreamInternal(parameterIndex, reader, false, length); | public final void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; ... |
Reader reader, long length) | Reader reader, final boolean lengthLess, long length) | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); | if (!lengthLess && length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
if (length > Integer.MAX_VALUE) | if (!lengthLess && length > Integer.MAX_VALUE) | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
int intLength = (int)length; | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... | |
try { | try { ReaderToUTF8Stream utfIn; ParameterValueSet pvs = getParms(); DataTypeDescriptor dtd[] = preparedStatement .getParameterTypes(); int colWidth = dtd[parameterIndex - 1].getMaximumWidth(); int usableLength = colWidth; | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
ParameterValueSet pvs = getParms(); int usableLength = intLength; int truncationLength = 0; | if (!lengthLess) { int intLength = (int)length; int truncationLength = 0; | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
if (jdbcTypeId == Types.CLOB) { DataTypeDescriptor dtd[] = preparedStatement .getParameterTypes(); int colWidth = dtd[parameterIndex - 1].getMaximumWidth(); | usableLength = intLength; | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
if (intLength > colWidth) { usableLength = colWidth; truncationLength = intLength - usableLength; | if (jdbcTypeId == Types.CLOB) { if (intLength > colWidth) { usableLength = colWidth; truncationLength = intLength - usableLength; } | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... |
ReaderToUTF8Stream utfIn = new ReaderToUTF8Stream( reader, usableLength, truncationLength); | private void setCharacterStreamInternal(int parameterIndex, Reader reader, long length) throws SQLException { // check for -ve length if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (reader ... | |
checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } if (colType != Types.CLOB) throw dataTypeConversion(i, "java.sql.Clob"); | checkClobConditions(i); | public void setClob (int i, Clob x) throws SQLException { checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2, only allow setClob on a CLOB column. if (colType != Types.CLOB) thro... |
setCharacterStreamInternal(i, x.getCharacterStream(), streamLength); | setCharacterStreamInternal(i, x.getCharacterStream(), false, streamLength); | public void setClob (int i, Clob x) throws SQLException { checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2, only allow setClob on a CLOB column. if (colType != Types.CLOB) thro... |
public void backup(String backupDir) throws SQLException; | public void backup(String backupDir, boolean wait) throws SQLException; | public void backup(String backupDir) throws SQLException; |
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws SQLException; | public void backupAndEnableLogArchiveMode( String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws SQLException; | public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws SQLException; |
"embeddedCreateBlobNotImplemented")); | "embeddedCreateBlob")); | private static TestSuite embeddedSuite() { TestSuite embeddedSuite = new TestSuite(); embeddedSuite.addTest(new ConnectionTest( "embeddedCreateBlobNotImplemented")); embeddedSuite.addTest(new ConnectionTest( "embeddedCreateClobNotImplemented")); retu... |
"embeddedCreateClobNotImplemented")); | "embeddedCreateClob")); | private static TestSuite embeddedSuite() { TestSuite embeddedSuite = new TestSuite(); embeddedSuite.addTest(new ConnectionTest( "embeddedCreateBlobNotImplemented")); embeddedSuite.addTest(new ConnectionTest( "embeddedCreateClobNotImplemented")); retu... |
if (leftOperand.isParameterNode()) | if (leftOperand.requiresTypeFromContext()) | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
if (rightOperand.isParameterNode()) | if (rightOperand.requiresTypeFromContext()) | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
((ParameterNode) leftOperand).setDescriptor(new DataTypeDescriptor(leftType, true)); | leftOperand.setType(new DataTypeDescriptor(leftType, true)); | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
((ParameterNode) rightOperand).setDescriptor( | rightOperand.setType( | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
throws StandardException | protected void initializeResultField(ExpressionClassBuilder acb, MethodBuilder mb, LocalField resultField) { mb.conditionalIfNull();//get the field on the stack and if it is null acb.generateNull(mb, getTypeCompiler());// yes, it is, hence create a NULL SQLxxx type object and put that on stack mb.startElseCode(); ... | |
columnList[ SYSROUTINEPERMS_ROUTINPERMSID - 1] = new SystemColumnImpl( convertIdCase( "ROUTINEPERMSID"), SYSROUTINEPERMS_ROUTINPERMSID, 0, 0, false, "CHAR", true, 36); | public SystemColumn[] buildColumnList() { if (columnList == null) { columnList = new SystemColumn[ COLUMN_COUNT]; columnList[ GRANTEE_COL_NUM - 1] = new SystemColumnImpl( convertIdCase( "GRANTEE"), GRANTEE_COL_NUM, ... | |
return new RoutinePermsDescriptor( dataDictionary, getAuthorizationID( row, GRANTEE_COL_NUM), getAuthorizationID( row, GRANTOR_COL_NUM), aliasUUID); | RoutinePermsDescriptor routinePermsDesc = new RoutinePermsDescriptor( dataDictionary, getAuthorizationID( row, GRANTEE_COL_NUM), getAuthorizationID( row, GRANTOR_COL_NUM), aliasUUID); routinePermsDesc.setUUID(routinePermsUUID); return routinePermsDesc; | public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTuple, DataDictionary dataDictionary) throws StandardException { if( SanityManager.DEBUG) SanityManager.ASSERT( row.nColumns() == COLUMN_CO... |
row.setColumn( SYSROUTINEPERMS_ROUTINPERMSID, dvf.getCharDataValue(routinePermID)); | public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException { DataValueDescriptor grantee = null; DataValueDescriptor grantor = null; String routineID = null; if( td == null) { grantee = getNullAuthorizationID(); grantor =... | |
public void flowAutoCommit() throws SqlException { | public boolean flowAutoCommit() throws SqlException { | public void flowAutoCommit() throws SqlException { if (willAutoCommitGenerateFlow()) { flowCommit(); } } |
return false; | public void flowAutoCommit() throws SqlException { if (willAutoCommitGenerateFlow()) { flowCommit(); } } | |
System.out.println(START + "blobTestNegativeTest_Derby265"); | private static void blobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { // basically setup the tables for clob and blob Statement s = conn.createStatement(); s.execute("create table \"MAPS_BLOB\"(MAP_ID int, MAP_NAME varchar(20),REGION ... | |
if ("XJ073".equals(sqle.getSQLState())) System.out.println("Expected Exception " + sqle.getMessage()); else System.out.println("FAIL -- unexpected exception:" + sqle.toString()); | String sqlstate = sqle.getSQLState(); boolean expected = (sqlstate != null && (sqlstate.equals("XJ073") || sqlstate.equals("XCL30"))); TestUtil.dumpSQLExceptions(sqle,expected); | private static void blobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { // basically setup the tables for clob and blob Statement s = conn.createStatement(); s.execute("create table \"MAPS_BLOB\"(MAP_ID int, MAP_NAME varchar(20),REGION ... |
System.out.println(START + "blobTest0"); | private static void blobTest0(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); byte[] buff = new byte[128]; // fetch row back, get the long varbinary column as a blob. Blob blob; in... | |
System.out.println(START + "blobTest2"); | private static void blobTest2(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) { i++; blob =... | |
System.out.println(START + "blobTest3"); | private static void blobTest3(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) { i++; blob =... | |
System.out.println(START + "blobTest4"); | private static void blobTest4(Connection conn) { ResultSet rs, rs2; Statement stmt, stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) { i++; ... | |
System.out.println(START + "blobTest51"); | private static void blobTest51(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testVarbinary (a blob(13))"); PreparedStatement ps = conn.prepareStatement( "insert into testVarbinary values(?)"); ... | |
System.out.println(START + "blobTest52"); | private static void blobTest52(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testInteger2 (a integer)"); int i = 1; PreparedStatement ps = conn.prepareStatement("insert into testInteger2 values(158)"... | |
System.out.println(START + "blobTest53"); | private static void blobTest53(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testBlobColumn (a blob(1K))"); System.out.println("blobTest53 finished"); } catch (SQLException e) { TestUtil.dumpSQLExcept... | |
try | System.out.println(START + "blobTest54"); try | private static void blobTest54(Connection conn) { ResultSet rs; Statement stmt1, stmt2; try { stmt1 = conn.createStatement(); stmt1.execute("create table testBlob2 (a integer, b integer)"); PreparedStatement ps = conn.prepareStatement( "insert into testBlob2 values(?,?)... |
System.out.println(START + "blobTest6"); | private static void blobTest6(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) { if (i > 0) ... | |
System.out.println(START + "blobTest7"); | private static void blobTest7(Connection conn) { ResultSet rs, rs2; Statement stmt1, stmt2; try { stmt1 = conn.createStatement(); stmt1.execute("create table testBlobX (a blob(300K), b integer)"); PreparedStatement ps = conn.prepareStatement( "insert into testBlobX valu... | |
System.out.println(START + "blobTest91"); | private static void blobTest91(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); byte[] buff = new byte[128]; Blob[] blobArray = new Blob[numRows]; int[] blobLengthArray = new int[numRows]; ... | |
try | System.out.println(START + "blobTest92"); try | private static void blobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlob = null; int blobLength; ... |
if (!TestUtil.isNetFramework()) { | private static void blobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlob = null; int blobLength; ... | |
stmt2 = conn2.createStatement(); stmt2.executeUpdate("update testBlob set b = b + 1 where b = 10000"); | stmt2 = conn2.createStatement(); stmt2.executeUpdate("update testBlob set b = b + 1 where b = 10000"); throw new Exception("FAIL: Should have gotten lock timeout"); } else { System.out.println("Locks not held by Network Server for Blobs since they are materialized on client"); } | private static void blobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlob = null; int blobLength; ... |
System.out.println(START + "blobTest93"); | private static void blobTest93(Connection conn) { ResultSet rs; Statement stmt, stmt2; try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large columns stmt.execute("create table testLongRowBlob (a varchar(2000))"); stmt.execute("alter table ... | |
if (shortBlob != null) | private static void blobTest94(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlob = null; int blobLength; whil... | |
System.out.println(START + "blobTest95"); | private static void blobTest95(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlob = null; int blobLength; whil... | |
System.out.println(START + "blobTest96"); | private static void blobTest96(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); byte[] buff = new byte[128]; Blob[] blobArray = new Blob[numRows]; int[] blobLengthArray = new int[numRows]; ... | |
System.out.println(START + "bug" ); | private static void bug(Connection conn) { ResultSet rs; Statement stmt, stmt2; try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large columns stmt.execute("create table testLongRowClob (a varchar(2000))"); stmt.execute("alter table testLon... | |
System.out.println(START + "bug2"); | private static void bug2(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows*2]; int[] clobLengthArray = new int[numRows*2]; ... | |
System.out.println(START + "clobNegativeTest_Derby265"); | private static void clobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { // basically setup the tables for clob Statement s = conn.createStatement(); s.execute("create table \"MAPS\"(MAP_ID int, MAP_NAME varchar(20),REGION varchar(20),A... | |
if ("XJ073".equals(sqle.getSQLState())) System.out.println("Expected Exception " + sqle.getMessage()); else System.out.println("FAIL -- unexpected exception:" + sqle.toString()); } | String sqlstate = sqle.getSQLState(); boolean expected = (sqlstate != null && (sqlstate.equals("XJ073") || sqlstate.equals("XCL30"))); TestUtil.dumpSQLExceptions(sqle,expected); } | private static void clobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { // basically setup the tables for clob Statement s = conn.createStatement(); s.execute("create table \"MAPS\"(MAP_ID int, MAP_NAME varchar(20),REGION varchar(20),A... |
System.out.println(START + "clobTest0"); | private static void clobTest0(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; // fetch row back, get the column as a clob. Clob clob; int clobLeng... | |
System.out.println(START + "clobTest1"); | private static void clobTest11(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); met = rs.getMetaData(); char[] buff = new char[128]; // fetch row back, get the column as a clob. ... | |
System.out.println(START + "clobTest12"); | private static void clobTest12(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, colLength = 0, arrayIndex = 0; while (rs.next()) { i++; colLeng... | |
System.out.println(START + "clobTest2"); | private static void clobTest2(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.next()) { i++; c... | |
System.out.println(START + "clobTest22"); | private static void clobTest22(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, clobLength = 0, arrayIndex = 0; Clob clob; while (rs.next()) { i++;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.