rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
byte [] publicKeyIn = null;
byte [] secTokenIn = null;
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
trace("Security mechanism = " + securityMechanism);
trace("parseACCSEC - Security mechanism = " + securityMechanism);
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
if (securityMechanism != CodePoint.SECMEC_EUSRIDPWD) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED;
if ((securityMechanism != CodePoint.SECMEC_EUSRIDPWD) && (securityMechanism != CodePoint.SECMEC_USRSSBPWD)) { securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; if (SanityManager.DEBUG) { trace("parseACCSEC - SECCHKCD_NOTSUPPORTED [2]\n"); } }
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
publicKeyIn = reader.readBytes();
secTokenIn = reader.readBytes();
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
database.publicKeyIn = publicKeyIn;
database.secTokenIn = secTokenIn; if (securityCheckCode == 0 && (database.securityMechanism == CodePoint.SECMEC_USRSSBPWD)) { if (SanityManager.DEBUG) SanityManager.ASSERT((securityCheckCode == 0), "SECMEC_USRSSBPWD: securityCheckCode should not " + "already be set, found it initialized with " + "a value of '" + s...
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD && database.publicKeyIn == null)
(database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD || database.securityMechanism == CodePoint.SECMEC_USRSSBPWD) && database.secTokenIn == null)
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
database.publicKeyIn != null)
database.secTokenIn != null)
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
trace("Security mechanism = " + securityMechanism);
trace("parseSECCHK - Security mechanism = " + securityMechanism);
private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECM...
if (database.securityMechanism != CodePoint.SECMEC_EUSRIDPWD)
if ((database.securityMechanism != CodePoint.SECMEC_EUSRIDPWD) && (database.securityMechanism != CodePoint.SECMEC_USRSSBPWD))
private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECM...
else if (database.decryptedUserId == null) { try { database.decryptedUserId = reader.readEncryptedString(decryptionManager, database.securityMechanism, myPublicKey, database.publicKeyIn); } catch (SQLException se) { println2Log(database.dbName, session.drdaID, se.getMessage()); if (securityCheckCode == 0) securityCheck...
else if (database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD) { if (database.decryptedUserId == null) { try { database.decryptedUserId = reader.readEncryptedString( decryptionManager, database.securityMechanism, myPublicKey, database.secTokenIn); } catch (SQLException se) { println2Log(database.dbName, session.drd...
private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECM...
} else tablePermsDesc.setUUID(null);
}
public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll...
} else colPermsDescs[i].setUUID(null);
}
public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll...
storeViewTriggerDependenciesOnPrivileges(activation, vd);
public void executeConstantAction( Activation activation ) throws StandardException { TableDescriptor td; UUID toid; SchemaDescriptor schemaDescriptor; ColumnDescriptor columnDescriptor; ViewDescriptor vd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictio...
System.out.println("PASS -- expected exception"); while (se != null) { System.out.println("SQLSTATE("+se.getSQLState()+"): "+se.getMessage()); se = se.getNextException(); }
System.out.println("PASS -- expected exception");
static private void expectedException (SQLException se, String expectedSQLState) { if( se.getSQLState() != null && (se.getSQLState().equals(expectedSQLState))) { System.out.println("PASS -- expected exception"); while (se != null) { System.out.println("SQLSTA...
se.printStackTrace(System.out);
while (se != null) { System.out.println("SQLSTATE("+se.getSQLState()+"): "+se.getMessage()); se.printStackTrace(System.out); se = se.getNextException(); }
static private void expectedException (SQLException se, String expectedSQLState) { if( se.getSQLState() != null && (se.getSQLState().equals(expectedSQLState))) { System.out.println("PASS -- expected exception"); while (se != null) { System.out.println("SQLSTA...
stmt1 = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); rs = stmt1.executeQuery("select * from testRelative"); rs.next(); returnValue = rs.getString("name"); System.out.println("Value="+returnValue); rs.relative(2); System.out.println("isFirst=" + rs.isFirst() + " isLast=" + rs.isLa...
} catch(SQLException se) { unexpectedSQLException(se); } catch(Throwable t) { System.out.println("FAIL--unexpected exception: "+t.getMessage()); t.printStackTrace(System.out); } try { testScrolling(ResultSet.CONCUR_READ_ONLY, con); testScrolling(ResultSet.CONCUR_UPDATABLE, con); } catch(Throwable e) { System.out.printl...
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(); con.comm...
if(!isDependentTable) generateParameterHolders(acb);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { //If the DML is on the temporary table, generate the code to mark temporary table as modified in the current UOW generateCodeForTemporaryTable(acb, mb); /* generate the parameters */ if(!isDependentTable) g...
dd.addRemovePermissionsDescriptor( grant, routinePermsDesc, grantee, tc);
if (dd.addRemovePermissionsDescriptor( grant, routinePermsDesc, grantee, tc)) dd.getDependencyManager().invalidateFor(routinePermsDesc, DependencyManager.REVOKE_PRIVILEGE, lcc);
public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { // Check that the current user has permission to grant the privileges. LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary...
int inputParameterType = CrossConverters.getInputJdbcType(targetJdbcType); parameterMetaData_.clientParamtertype_[parameterIndex - 1] = inputParameterType; x = agent_.crossConverters_.setObject(inputParameterType, x); try { if (targetJdbcType == java.sql.Types.DECIMAL || targetJdbcType == java.sql.Types.NUMERIC) { x ...
private void setObjectX(int parameterIndex, Object x, int targetJdbcType, int scale) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); checkForValidScale(scale); if (x == null) { ...
public void testSetAsciiStream() throws SQLException {
public void testSetAsciiStream() throws Exception {
public void testSetAsciiStream() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new...
try { is.reset(); } catch (IOException ioe) { fail("Failed to reset Clob input stream: " + ioe.getMessage()); }
is.reset();
public void testSetAsciiStream() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new...
public void testSetBinaryStream() throws SQLException {
public void testSetBinaryStream() throws Exception {
public void testSetBinaryStream() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = ne...
try { is.reset(); } catch (IOException ioe) { fail("Failed to reset blob input stream: " + ioe.getMessage()); }
is.reset();
public void testSetBinaryStream() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = ne...
public void testSetCharacterStream() throws SQLException {
public void testSetCharacterStream() throws Exception {
public void testSetCharacterStream() throws SQLException { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { fail("Failed to reset Clob input strea...
try { is.reset(); } catch (IOException ioe) { fail("Failed to reset Clob input stream: " + ioe.getMessage()); }
is.reset();
public void testSetCharacterStream() throws SQLException { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { fail("Failed to reset Clob input strea...
if (fromMajorVersionNumber <= DataDictionary.DD_VERSION_DERBY_10_1) { bootingDictionary.create_10_2_system_procedures( tc, bootingDictionary.getSystemUtilSchemaDescriptor().getUUID()); }
private void doFullUpgrade(TransactionController tc, int fromMajorVersionNumber) throws StandardException { // Only supports upgrade from Derby 10.0 releases onwards if (fromMajorVersionNumber < DataDictionary.DD_VERSION_CS_10_0) { throw StandardException.newException(SQLState.UPGRADE_UNSUPPORTED, DD_Version...
currentRow = null;
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be in a finally // block, to ensure that it is executed? clearCurrentRow(); curren...
System.out.println(attributes[j].name + ": " + attributes[j].value);
System.out.print(attributes[j].name + " - value: " + attributes[j].value); String[] choices = attributes[j].choices; System.out.print(" - description: " + attributes[j].description + " - required " + attributes[j].required); if (choices != null) { for (int k = 0; k < choices.length; k++) { System.out.print(" - cho...
public static void main(String[] args) throws SQLException, InterruptedException, Exception { boolean passed = true; // adjust URL to compensate for other encryption providers String provider = System.getProperty("testEncryptionProvider"); if (provider != null) { url = "EncryptedDB;create=true;dataEncr...
System.out.println("EXCEPTION " +e.getMessage()); continue;
public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th...
public dataSourcePermissions_net() {
public dataSourcePermissions_net( SwitchablePrintStream consoleLogStream, PrintStream originalStream, FileOutputStream shutdownLogStream, SwitchablePrintStream consoleErrLogStream, PrintStream originalErrStream, FileOutputStream shutdownErrLogStream ) { consoleLogStream_ = consoleLogStream; originalStream_ = originalS...
public dataSourcePermissions_net() { }
dataSourcePermissions_net tester = new dataSourcePermissions_net();
dataSourcePermissions_net tester = new dataSourcePermissions_net( consoleLogStream , originalStream , shutdownLogStream , consoleErrLogStream , originalErrStream, shutdownErrLogStream);
public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ...
new dataSourcePermissions_net().cleanUp();
new dataSourcePermissions_net( consoleLogStream , originalStream , shutdownLogStream , consoleErrLogStream , originalErrStream , shutdownErrLogStream ).cleanUp();
public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ...
System.out.close(); System.err.close();
originalErrStream.close(); shutdownErrLogStream.close();
public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ...
DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName,
consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ ); DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName,
public void shutdown() { try { DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", "EDWARD", "noodle"); System.out.println("FAIL - Shutdown returned connection"); } catch (SQLException sqle) { System.out.println("EXPECTED SHU...
} catch (IOException ioe){ originalStream_.println("Switching stream was failed. Could not complete test ... "); }
public void shutdown() { try { DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", "EDWARD", "noodle"); System.out.println("FAIL - Shutdown returned connection"); } catch (SQLException sqle) { System.out.println("EXPECTED SHU...
public final void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { getPreparedStatement().setBinaryStream(parameterIndex, x);
public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { getPreparedStatement().setBinaryStream(parameterIndex,x,length);
public final void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { getPreparedStatement().setBinaryStream(parameterIndex, x); }
public final void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { getPreparedStatement().setCharacterStream(parameterIndex, reader);
public final void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { getPreparedStatement().setCharacterStream(parameterIndex,x,length);
public final void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { getPreparedStatement().setCharacterStream(parameterIndex, reader); }
public JoinResultSet(NoPutResultSet leftResultSet,
JoinResultSet(NoPutResultSet leftResultSet,
public JoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRigh...
String userSuppliedOptimizerOverrides, GeneratedMethod closeCleanup)
String userSuppliedOptimizerOverrides)
public JoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRigh...
this.closeCleanup = closeCleanup;
public JoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRigh...
if (closeCleanup != null) { closeCleanup.invoke(activation); }
public void close() throws StandardException { clearScanState(); if ( isOpen ) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } leftResultSet.close(); if (isRightOpen) { closeRight(); } super.close(); } else if (SanityManager.DEBUG) Sa...
if (!TestUtil.isJCCFramework()) { cs = conn.prepareCall("? = call method4()"); try { cs.registerOutParameter (1, java.sql.Types.INTEGER, "user-def"); System.out.println("DERBY-1184 FAIL: Expected exception"); } catch (SQLException expectedException) { if (! "0AX01".equals(expectedException.getSQLState())) { System.out....
public static void main (String args[]) { try { System.out.println("CallableStatement Test Starts"); ij.getPropertyArg(args); // This also tests quoted pathname in database name portion of URL, beetle 4781. String protocol = System.getProperty("ij.protocol"); String hostName = TestUtil.getHostName(); Sy...
if (SanityManager.DEBUG) SanityManager.ASSERT(backupBlockingOperations == 0 && inBackup == true, "store is not in correct state for backup");
if (SanityManager.DEBUG) { if (inBackup) { SanityManager.ASSERT(backupBlockingOperations == 0 , "store is not in correct state for backup"); } }
public boolean stopBackupBlockingOperations(boolean wait) throws StandardException { synchronized(backupSemaphore) { if (wait) { // set the inBackup state to true first to stop new backup // blocking operation from starting. inBackup= true; try { // wait for backup blocking operation in progress ...
protected EmbedBlob(DataValueDescriptor dvd, EmbedConnection con) throws StandardException { super(con); if (SanityManager.DEBUG) SanityManager.ASSERT(!dvd.isNull(), "blob is created on top of a null column"); myStream = dvd.getStream(); if (myStream == null) { isBytes = true; byte[] dvdBytes = dvd.getBytes(); if...
EmbedBlob(byte [] blobBytes,EmbedConnection con) { super(con); myBytes = blobBytes; isBytes = true; myLength = myBytes.length; }
protected EmbedBlob(DataValueDescriptor dvd, EmbedConnection con) throws StandardException { super(con); // if the underlying column is null, ResultSet.getBlob will return null, // never should get this far if (SanityManager.DEBUG) SanityManager.ASSERT(!dvd.isNull(),...
dd.dropAllTableAndColPermDescriptors(td.getUUID(), tc);
public void dropViewWork(DataDictionary dd, DependencyManager dm, LanguageConnectionContext lcc, TransactionController tc, SchemaDescriptor sd, TableDescriptor td, boolean cascade) throws StandardException { /* Drop the columns */ dd.dropAllColumnDescriptors(td.getUUID(), tc); /* Prepare all depend...
tc, activation, true);
tc, lcc, true);
private void dropAllConstraintDescriptors(TableDescriptor td, Activation activation) throws StandardException { ConstraintDescriptor cd; ConstraintDescriptorList cdl; ConstraintDescriptor fkcd; ConstraintDescriptorList fkcdl; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(...
tc, activation, false);
tc, lcc, false);
private void dropAllConstraintDescriptors(TableDescriptor td, Activation activation) throws StandardException { ConstraintDescriptor cd; ConstraintDescriptorList cdl; ConstraintDescriptor fkcd; ConstraintDescriptorList fkcdl; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(...
return readLengthAndCodePoint();
return readLengthAndCodePoint( false );
protected int getCodePoint() throws DRDAProtocolException { if (topDdmCollectionStack == EMPTY_STACK) { return NO_CODEPOINT; } else { // if the collecion is exhausted then return NO_CODEPOINT if (ddmCollectionLenStack[topDdmCollectionStack] == 0) { // done with this collection so remove it's length ...
} else { return new EXTDTAReaderInputStream(this); }
} else if ( doingLayerBStreaming ){ return new LayerBStreamedEXTDTAReaderInputStream(this); } else { return new StandardEXTDTAReaderInputStream(this); }
EXTDTAReaderInputStream getEXTDTAReaderInputStream (final boolean checkNullability) throws DRDAProtocolException { if (checkNullability && isEXTDTANull()) { return null; } else { return new EXTDTAReaderInputStream(this); } }
int copySize = (int) Math.min(dssLength, desiredLength);
int copySize = doingLayerBStreaming ? dssLength : (int) Math.min(dssLength, desiredLength);
private ByteArrayInputStream readLOBChunk (final boolean readHeader, final long desiredLength) throws DRDAProtocolException { if (readHeader) { readDSSContinuationHeader(); } int copySize = (int) Math.min(dssLength, desiredLength); // read the segment ensureALayerDataInBuffer (copySize); adjustLengths...
adjustLengths (copySize);
if( ! doingLayerBStreaming ){ adjustLengths (copySize); }else{ dssLength -= copySize; }
private ByteArrayInputStream readLOBChunk (final boolean readHeader, final long desiredLength) throws DRDAProtocolException { if (readHeader) { readDSSContinuationHeader(); } int copySize = (int) Math.min(dssLength, desiredLength); // read the segment ensureALayerDataInBuffer (copySize); adjustLengths...
if( doingLayerBStreaming && ! dssIsContinued ) finishLayerBStreaming();
private ByteArrayInputStream readLOBChunk (final boolean readHeader, final long desiredLength) throws DRDAProtocolException { if (readHeader) { readDSSContinuationHeader(); } int copySize = (int) Math.min(dssLength, desiredLength); // read the segment ensureALayerDataInBuffer (copySize); adjustLengths...
ByteArrayInputStream readLOBContinuationStream (final long desiredLength)
ByteArrayInputStream readLOBContinuationStream ()
ByteArrayInputStream readLOBContinuationStream (final long desiredLength) throws IOException { try { return readLOBChunk(true, desiredLength); } catch (DRDAProtocolException e) { e.printStackTrace(agent.getServer().logWriter); throw new IOException(e.getMessage()); } }
try { return readLOBChunk(true, desiredLength); } catch (DRDAProtocolException e) { e.printStackTrace(agent.getServer().logWriter); throw new IOException(e.getMessage()); }
if ( SanityManager.DEBUG ) { SanityManager.ASSERT( doingLayerBStreaming ); } return readLOBContinuationStream( 0 );
ByteArrayInputStream readLOBContinuationStream (final long desiredLength) throws IOException { try { return readLOBChunk(true, desiredLength); } catch (DRDAProtocolException e) { e.printStackTrace(agent.getServer().logWriter); throw new IOException(e.getMessage()); } }
ByteArrayInputStream readLOBInitStream(final long desiredLength)
ByteArrayInputStream readLOBInitStream()
ByteArrayInputStream readLOBInitStream(final long desiredLength) throws DRDAProtocolException { return readLOBChunk(false, desiredLength); }
return readLOBChunk(false, desiredLength);
if ( SanityManager.DEBUG ) { SanityManager.ASSERT( doingLayerBStreaming ); } return readLOBInitStream( 0 );
ByteArrayInputStream readLOBInitStream(final long desiredLength) throws DRDAProtocolException { return readLOBChunk(false, desiredLength); }
protected int readLengthAndCodePoint() throws DRDAProtocolException
protected int readLengthAndCodePoint( boolean isLayerBStreamingPossible ) throws DRDAProtocolException
protected int readLengthAndCodePoint() throws DRDAProtocolException { ensureBLayerDataInBuffer (4, NO_ADJUST_LENGTHS); ddmScalarLen = readCodePoint(); int codePoint = readCodePoint(); if (SanityManager.DEBUG) trace("length = "+ ddmScalarLen + " codepoint = " + java.lang.Integer.toHexString(codePoint)); // SYN...
case 0: if( isLayerBStreamingPossible && ( codePoint == CodePoint.EXTDTA || codePoint == CodePoint.QRYDTA ) ){ startLayerBStreaming(); adjustSize = 4; }else { agent.throwSyntaxrm(CodePoint.SYNERRCD_INCORRECT_EXTENDED_LEN, DRDAProtocolException.NO_CODPNT_ARG); } break;
protected int readLengthAndCodePoint() throws DRDAProtocolException { ensureBLayerDataInBuffer (4, NO_ADJUST_LENGTHS); ddmScalarLen = readCodePoint(); int codePoint = readCodePoint(); if (SanityManager.DEBUG) trace("length = "+ ddmScalarLen + " codepoint = " + java.lang.Integer.toHexString(codePoint)); // SYN...
numArgs = 25;
numArgs = 26;
public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca...
numArgs = 24;
numArgs = 25;
public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca...
skipRemainder(true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
t_isValid_Client();
t_isValid();
public void startTestConnectionMethods_Client() { t_createClob_Client(); t_createBlob_Client(); t_createNClob(); t_createSQLXML(); t_isValid_Client(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); ...
t_isValid_Embed();
t_isValid();
public void startTestConnectionMethods_Embedded() { t_createClob(); t_createBlob(); t_createNClob(); t_createSQLXML(); t_isValid_Embed(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); }
if(logArchived) switchLogFile();
public void freezePersistentStore() throws StandardException { // if I get into this synchronized block, I know I am not in the middle // of a write because writing to the log file is synchronized under this. synchronized(this) { //when the log is being archived for roll-frward recovery //we would like to swi...
firstLogNeeded = LogCounter.getLogFileNumber(checkpoint.undoLWM());
firstLogNeeded = (checkpoint != null ? LogCounter.getLogFileNumber(checkpoint.undoLWM()) : -1);
private long getFirstLogNeeded(CheckpointOperation checkpoint){ long firstLogNeeded; // one truncation at a time synchronized (this) { firstLogNeeded = LogCounter.getLogFileNumber(checkpoint.undoLWM()); if (SanityManager.DEBUG) { if (SanityManager.DEBUG_ON(LogToFile.DBG_FLAG)) SanityManager.DEBUG(DBG_...
throw StandardException.newException(SQLState.BLOB_NULL_PATTERN);
throw StandardException.newException(SQLState.BLOB_NULL_PATTERN_OR_SEARCH_STR);
public long position(String searchStr, long start) throws SQLException { boolean pushStack = false; try { if (start < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(start)); if (searchStr == null) ...
public MergeJoinResultSet(NoPutResultSet leftResultSet,
MergeJoinResultSet(NoPutResultSet leftResultSet,
public MergeJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod leftGreaterThanRight, GeneratedMethod restriction, int resultSetNumber, boo...
optimizerEstimatedCost, null, closeCleanup);
optimizerEstimatedCost, null);
public MergeJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod leftGreaterThanRight, GeneratedMethod restriction, int resultSetNumber, boo...
suite.addTest(LobStreamsTest.suite());
public static Test suite() { TestSuite suite = new TestSuite("jdbcapi"); suite.addTest(ConcurrencyTest.suite()); suite.addTest(HoldabilityTest.suite()); suite.addTest(ProcedureTest.suite()); suite.addTest(SURQueryMixTest.suite()); suite.addTest(SURTest.suite()); suite.addTest(UpdatableResultSetTest.suite()); s...
false,
true,
public SystemColumn[] buildColumnList() { SystemColumn[] columnList = new SystemColumn[SYSVIEWS_COLUMN_COUNT]; columnList[0] = new SystemColumnImpl( convertIdCase( "TABLEID"), // name SYSVIEWS_TABLEID, // column number 0, // precision 0, // scale false, // nullability ...
ResultSet rs = pss.executeQuery(); while (rs.next()) { System.out.print(" EL byte[] " + length); byte[] v = rs.getBytes(1); if (v != null) { System.out.print(" C1 " + ((v.length == length) ? "OK" : ("FAIL <" + v.length + ">"))); System.out.print(" DATA " + ((v[off] == 0x23) ? "OK" : ("FAIL " + off))); } else System.out...
selectData(pss,data,off,length);
private static void insertEL(PreparedStatement psi, PreparedStatement pss, PreparedStatement psd, int length) throws SQLException, IOException { Connection conn = psi.getConnection(); byte[] data = new byte[length]; // random simple value check int off = (int) (System.currentTimeMillis() % ((long) length)); data...
psd.executeUpdate();
selectData(pss,data,off,length); conn.commit();
private static void insertEL(PreparedStatement psi, PreparedStatement pss, PreparedStatement psd, int length) throws SQLException, IOException { Connection conn = psi.getConnection(); byte[] data = new byte[length]; // random simple value check int off = (int) (System.currentTimeMillis() % ((long) length)); data...
psd.executeUpdate();
private static void insertEL(PreparedStatement psi, PreparedStatement pss, PreparedStatement psd, int length) throws SQLException, IOException { Connection conn = psi.getConnection(); byte[] data = new byte[length]; // random simple value check int off = (int) (System.currentTimeMillis() % ((long) length)); data...
public ResultColumnList getResultColumnsForList(String allTableName,
public ResultColumnList getResultColumnsForList(TableName allTableName,
public ResultColumnList getResultColumnsForList(String allTableName, ResultColumnList inputRcl, TableName tableName) throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; String columnName; TableName exposedName; /* If allTableN...
if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; }
if(correlationName == null) toCompare = tableName; else { if(allTableName != null) toCompare = makeTableName(allTableName.getSchemaName(),correlationName); else toCompare = makeTableName(null,correlationName); } if ( allTableName != null && ! allTableName.equals(toCompare)) { return null; }
public ResultColumnList getResultColumnsForList(String allTableName, ResultColumnList inputRcl, TableName tableName) throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; String columnName; TableName exposedName; /* If allTableN...
if (batchSize > 65534) throw new BatchUpdateException(agent_.logWriter_, "No more than 65534 commands may be added to a single batch", updateCounts);
private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu...
s.executeUpdate("drop table ct");
public static void testCharConcatenation( Connection conn) throws Throwable { try { System.out.println("Test1 - CHAR, VARCHAR, LONGVARCHAR and CLOB concatenation tests"); String columnC1value; String columnC2value = Formatters.repeatChar("a",40); String columnVC1value; String columnVC2value; String colu...
s.executeUpdate("drop table bt");
public static void testCharForBitDataConcatenation( Connection conn) throws Throwable { try { System.out.println("Test2 - CHAR FOR BIT DATA, VARCHAR FOR BIT DATA, LONGVARCHAR FOR BIT DATA and BLOB concatenation tests"); Statement s = conn.createStatement(); byte[] columnCBD0value = {(byte)'a'}; byte[] colum...
warnings = conn.getWarnings(); while (warnings != null) { JDBCDisplayUtil.ShowWarnings(System.out, warnings); warnings = warnings.getNextWarning(); } conn.clearWarnings();
JDBCDisplayUtil.ShowWarnings(System.out, conn);
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...
while (warnings != null) { System.out.println("warnings on connection = " + warnings); warnings = warnings.getNextWarning(); } conn.clearWarnings();
JDBCDisplayUtil.ShowWarnings(System.out, conn);
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...
warnings = rs.getWarnings(); while (warnings != null) { System.out.println("Expected warnings on resultset = " + warnings); warnings = warnings.getNextWarning(); } rs.clearWarnings();
JDBCDisplayUtil.ShowWarnings(System.out, rs);
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("In embedded mode, updateRow will check if it is on a row or not even though no changes have been made to the row using updateXXX"); System.out.println("In Network Server mode, if no updateXXX were issued before updateRow, then updateRow is a no-op and doesn't check if it is on a row or not");
System.out.println("updateRow will check if it is on a row or not even " + "though no changes have been made to the row using updateXXX");
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 (TestUtil.isEmbeddedFramework()) System.out.println("FAIL!!! In embedded mode, this updateRow should have failed because resultset is not on a row"); else System.out.println("PASS!!! In Network Server mode, this updateRow is a no-op because no updateXXX were issued before the updateRow");
System.out.println("FAIL!!! updateRow should have failed because " + "resultset is not on a row");
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...
warnings = conn.getWarnings(); while (warnings != null) { System.out.println("Unexpected warnings = " + warnings); warnings = warnings.getNextWarning(); }
JDBCDisplayUtil.ShowWarnings(System.out, conn);
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("Since after deleteRow(), in embedded mode, ResultSet is positioned before the next row, getXXX will fail"); System.out.println("In Network Server mode, the ResultSet stays on the deleted row after deleteRow and hence no error for getXXX");
System.out.println("Since after deleteRow(), in embedded mode and Network "+ "Server mode using Derby Net Client, ResultSet is positioned before " + "the next row, getXXX will fail");
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 (TestUtil.isEmbeddedFramework()) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); } else System.out.println("Got unexpected exception " + e.getMessage());
System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage());
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 (TestUtil.isEmbeddedFramework()) {
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("Since after updateRow(), in embedded mode, ResultSet is positioned before the next row, getXXX will fail"); System.out.println("In Network Server mode, the ResultSet stays on the updated row after updateRow and hence no error for getXXX");
System.out.println("Since after updateRow(), in embedded mode and Network "+ "Server mode using Derby Net Client, ResultSet is positioned before " + "the next row, getXXX will fail");
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("Positive Test2 - even if no columns from table specified in the column list, we should be able to get updatable resultset");
System.out.println("Positive Test2 - even if no columns from table " + "specified in the column list, we should be able to get updatable " + "resultset");
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...
rs.deleteRow();
try { rs.deleteRow(); if (TestUtil.isNetFramework()) System.out.println("FAIL!!! should have failed in network server"); else System.out.println("PASS!!! passed in embedded mode"); } catch (SQLException e) { if (TestUtil.isNetFramework()) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got e...
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...
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE of c1");
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("Positive Test8a - change the name of the resultset and see if deleteRow still works");
System.out.println("Positive Test8a - change the name of the statement " + "when the resultset is open and see if deleteRow still works"); System.out.println("This test works in embedded mode since Derby can " + "handle the change in the name of the statement with an open resultset"); System.out.println("But it fails u...
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...
stmt.setCursorName("CURSORNOUPDATE1"); rs.next(); rs.deleteRow(); rs.close(); System.out.println("Positive Test8b - change the name of the resultset and see if updateRow still works");
try { stmt.setCursorName("CURSORNOUPDATE1"); rs.next(); rs.deleteRow(); if (TestUtil.isNetFramework()) System.out.println("FAIL!!! should have failed in network server"); else System.out.println("PASS!!! passed in embedded mode"); } catch (SQLException e) { if (TestUtil.isNetFramework()) { System.out.println("SQL State...
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...
stmt.setCursorName("CURSORNOUPDATE1"); rs.updateRow(); rs.close(); System.out.println("Positive Test9a - using correlation name for the table in the select sql is not a problem");
try { stmt.setCursorName("CURSORNOUPDATE1"); rs.updateRow(); if (TestUtil.isNetFramework()) System.out.println("FAIL!!! should have failed in network server"); else System.out.println("PASS!!! passed in embedded mode"); } catch (SQLException e) { if (TestUtil.isNetFramework()) { System.out.println("SQL State : " + e.ge...
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...
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 abcde FOR UPDATE of c1");
rs = stmt.executeQuery("SELECT * FROM t1 abcde FOR UPDATE of c1");
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...
rs.deleteRow(); rs.close(); System.out.println("Positive Test9b - using correlation name for updatable column name is not allowed");
try { rs.deleteRow(); if (TestUtil.isJCCFramework()) System.out.println("FAIL!!! should have failed in network server"); else System.out.println("PASS!!! passed in embedded mode"); } catch (SQLException e) { if (TestUtil.isJCCFramework()) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got e...
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("Positive Test9c - try to updateXXX on a readonly column. Should get error"); reloadData(); rs = stmt.executeQuery("SELECT c1, c2 FROM t1 abcde FOR UPDATE of c1"); rs.next(); try { rs.updateString(2,"bbbb"); System.out.println("FAIL!!! updateString on readonly column should have failed"); } catch (SQ...
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...
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE"); rs.next(); rs1 = stmt1.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE"); rs.next(); rs1 = stmt1.executeQuery("SELECT * FROM t1 FOR UPDATE");
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...
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
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...
stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); stmt1 = conn.createStatement();
PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM AllDataTypesForTestingTable FOR UPDATE", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); PreparedStatement pstmt1 = conn.prepareStatement("SELECT * FROM AllDataTypesNewValuesData");
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...