rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void backupAndEnableLogArchiveMode(String backupDir,boolean deleteOnlineArchivedLogFiles) | public void backupAndEnableLogArchiveMode( String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) | public void backupAndEnableLogArchiveMode(String backupDir,boolean deleteOnlineArchivedLogFiles) throws StandardException { logFactory.enableLogArchiveMode(); backup(backupDir); //After successful backup delete the archived log files //that are not necessary to do a roll-forward recovery //from this... |
logFactory.enableLogArchiveMode(); backup(backupDir); if(deleteOnlineArchivedLogFiles) { logFactory.deleteOnlineArchivedLogFiles(); } | boolean enabledLogArchive = false; boolean error = true; try { if(!logFactory.logArchived()) { logFactory.enableLogArchiveMode(); enabledLogArchive = true ; } backup(backupDir, wait); if (deleteOnlineArchivedLogFiles) { logFactory.deleteOnlineArchivedLogFiles(); } error = false; } finally { if(error) { if (enab... | public void backupAndEnableLogArchiveMode(String backupDir,boolean deleteOnlineArchivedLogFiles) throws StandardException { logFactory.enableLogArchiveMode(); backup(backupDir); //After successful backup delete the archived log files //that are not necessary to do a roll-forward recovery //from this... |
public TableScanResultSet(long conglomId, | TableScanResultSet(long conglomId, | public TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qua... |
double optimizerEstimatedCost, GeneratedMethod closeCleanup) | double optimizerEstimatedCost) | public TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qua... |
this.closeCleanup = closeCleanup; | public TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qua... | |
if (closeCleanup != null) { try { closeCleanup.invoke(activation); } catch (StandardException se) { if (SanityManager.DEBUG) SanityManager.THROWASSERT(se); } } currentRow = null; | ; | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { /* ** If scan tracing is turned on, print information about this ** TableScanResultSet when it is closed. */ if (SanityManager.DEBUG) { if (SanityManager.DEBUG_ON("ScanTrace")) { //traceClose(... |
if (paramBytes==null || !useSetBinaryStream) { ps.setBytes(i+1, paramBytes); | if ( paramBytes==null ) { ps.setBytes(i+1, null ); | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen, boolean streamLOB) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if ... |
if (bigIndex < 0) { bytes[offset+(packedIndex+1)/2] = (byte) ( (b.signum()>=0)?12:13 ); } else { bytes[offset+(packedIndex+1)/2] = (byte) ( ( (unscaledStr.charAt(bigIndex)-zeroBase) << 4 ) + ( (b.signum()>=0)?12:13 ) ); } | if (bigIndex < 0) { bytes[offset+(packedIndex+1)/2] = (byte) ( (b.signum()>=0)?12:13 ); } else { bytes[offset+(packedIndex+1)/2] = (byte) ( ( (unscaledStr.charAt(bigIndex)-zeroBase) << 4 ) + ( (b.signum()>=0)?12:13 ) ); } packedIndex-=2; bigIndex-=2; } else { bigIndex = declaredScale-bigScale-1; bytes[offset+(p... | private int bigDecimalToPackedDecimalBytes (java.math.BigDecimal b, int precision, int scale) throws SQLException { int declaredPrecision = precision; int declaredScale = scale; // packed decimal may only be up to 31 digits. if (decla... |
bigIndex-=2; } else { bigIndex = declaredScale-bigScale-1; bytes[offset+(packedIndex+1)/2] = (byte) ( (b.signum()>=0)?12:13 ); for (packedIndex-=2, bigIndex-=2; bigIndex>=0; packedIndex-=2, bigIndex-=2) bytes[offset+(packedIndex+1)/2] = (byte) 0; if (bigIndex == -1) { bytes[offset+(packedIndex+1)/2] = (byte) ( ... | bigIndex = bigPrecision-3; } else { bigIndex = bigPrecision-2; } | private int bigDecimalToPackedDecimalBytes (java.math.BigDecimal b, int precision, int scale) throws SQLException { int declaredPrecision = precision; int declaredScale = scale; // packed decimal may only be up to 31 digits. if (decla... |
private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } offset += extendedLengthByteCount; | private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; | private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } off... |
offset += extendedLengthByteCount; } | private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } off... | |
int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codePoint, writeNullByte); int bytesRead = 0; int totalBytesRead = 0; | int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { | protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent o... |
try { OutputStream out = placeLayerBStreamingBuffer( agent.getOutputStream() ); boolean isLastSegment = false; while( !isLastSegment ){ int spareBufferLength = bytes.length - offset; if( SanityManager.DEBUG ){ if( PropertyUtil.getSystemProperty("derby.debug.suicideOfLayerBStreaming") != null ) throw new IOExcepti... | protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent o... | |
isLastSegment = peekStream(in) < 0; if(isLastSegment || spareDssLength == 0){ flushScalarStreamSegment (isLastSegment, out); if( ! isLastSegment ) spareDssLength = DssConstants.MAX_DSS_LENGTH - 2; | int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codePoint, writeNullByte); int bytesRead = 0; int totalBytesRead = 0; | protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent o... |
} } out.flush(); }catch(IOException e){ agent.markCommunicationsFailure ("DDMWriter.writeScalarStream()", "", e.getMessage(), "*"); } } | try { OutputStream out = placeLayerBStreamingBuffer( agent.getOutputStream() ); boolean isLastSegment = false; while( !isLastSegment ){ int spareBufferLength = bytes.length - offset; if( SanityManager.DEBUG ){ if( PropertyUtil.getSystemProperty("derby.debug.suicideOfLayerBStreaming") != null ) throw new IOExcepti... | protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent o... |
Object [][] expectedRows, boolean allAsTrimmedStrings) throws SQLException { int rows; ResultSetMetaData rsmd = rs.getMetaData(); Assert.assertEquals("Unexpected column count:", expectedRows[0].length, rsmd.getColumnCount()); for (rows = 0; rs.next(); rows++) { if (rows < expectedRows.length) { assertRowInResultSet... | String [][] expectedRows) throws SQLException { assertFullResultSet(rs, expectedRows, true); } | public static void assertFullResultSet(ResultSet rs, Object [][] expectedRows, boolean allAsTrimmedStrings) throws SQLException { int rows; ResultSetMetaData rsmd = rs.getMetaData(); // Assert that we have the right number of columns. Assert.assertEquals("Unexpected colu... |
":\n Expected: " + expectedRow[i] + "\n Found: " + obj); | ":\n Expected: >" + expectedRow[i] + "<\n Found: >" + obj + "<"); | private static void assertRowInResultSet(ResultSet rs, int rowNum, Object [] expectedRow, boolean asTrimmedStrings) throws SQLException { String s; boolean ok; Object obj = null; ResultSetMetaData rsmd = rs.getMetaData(); for (int i = 0; i < expectedRow.length; i++) ... |
closeMethodArgument(acb, mb); return 15; | return 14; | private int getScanArguments(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { int rclSize = resultColumns.size(); FormatableBitSet referencedCols = new FormatableBitSet(rclSize); int erdNumber = -1; int numSet = 0; // Get our final cost estimate. costEstimate = getF... |
newdssLength += continueHeaderLength; | newdssLength += (continueHeaderLength-2); | private void compressBLayerData (int continueDssHeaderCount) throws DRDAProtocolException { // jump to the last continuation header. int tempPos = 0; for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full DSS if (i == 0) { // only jump by the number of by... |
if (i == (continueDssHeaderCount - 1)) | if (i != (continueDssHeaderCount - 1)) | private void compressBLayerData (int continueDssHeaderCount) throws DRDAProtocolException { // jump to the last continuation header. int tempPos = 0; for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full DSS if (i == 0) { // only jump by the number of by... |
tempPos -= (shiftSize - 1); System.arraycopy(buffer, tempPos, buffer, tempPos - bytesToShift + shiftSize , bytesToShift); tempPos -= bytesToShift; tempPos += (shiftSize + 1); | tempPos -= (bytesToShift - 2); System.arraycopy(buffer, tempPos - shiftSize, buffer, tempPos, bytesToShift); | private void compressBLayerData (int continueDssHeaderCount) throws DRDAProtocolException { // jump to the last continuation header. int tempPos = 0; for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full DSS if (i == 0) { // only jump by the number of by... |
dssLength += newdssLength; | private void compressBLayerData (int continueDssHeaderCount) throws DRDAProtocolException { // jump to the last continuation header. int tempPos = 0; for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full DSS if (i == 0) { // only jump by the number of by... | |
if (length < dssLength) | if (length < DssConstants.MAX_DSS_LENGTH) | protected byte[] readBytes (int length) throws DRDAProtocolException { byte[] b; if (length < dssLength) { ensureBLayerDataInBuffer (length, ADJUST_LENGTHS); b = new byte[length]; System.arraycopy(buffer,pos,b,0,length); pos +=length; } else b = getExtData(length,false); return b; } |
case SYSREQUIREDPERM_CATALOG_NUM: retval = new TabInfoImpl(new SYSREQUIREDPERMRowFactory( luuidFactory, exFactory, dvf, convertIdToLower)); break; | protected TabInfo getNonCoreTIByNumber(int catalogNumber) throws StandardException { int nonCoreNum = catalogNumber - NUM_CORE; // Look up the TabInfo in the array. This does not have to be // synchronized, because getting a reference is atomic. TabInfo retval = noncoreInfo[nonCoreNum]; if (retval == null) ... | |
if (!TestUtil.isJCCFramework()) { testSecurityMechanism("john","sarah",new Short(SECMEC_EUSRIDPWD),"SECMEC_EUSRIDPWD:"); } | public void getConnectionUsingDataSource() { // bug in jcc, throws error with null password //testSecurityMechanism("sarah",null,new Short(SECMEC_USRIDONL),"SECMEC_USRIDONL:"); testSecurityMechanism("john","sarah",new Short(SECMEC_USRIDPWD),"SECMEC_USRIDPWD:"); // Disable this test because ibm142, ... | |
dumpSQLException(sqle.getNextException()); | public void getConnectionUsingDriverManager(String dbUrl, String msg) { try { DriverManager.getConnection(dbUrl); System.out.println(msg +" "+dbUrl ); } catch(SQLException sqle) { System.out.println(msg +" "+dbUrl +" - EXCEPTION "+ sqle.getMessage()); } } | |
getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;password=lee;securityMechanism="+SECMEC_EUSRIDPWD),"T5:"); | 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... | |
catch (Exception e) | catch (SQLException sqle) | public void testSecurityMechanism(String user, String password,Short secmec,String msg) { Connection conn; String securityMechanismProperty = "SecurityMechanism"; Class[] argType = { Short.TYPE }; String methodName = TestUtil.getSetterName(securityMechanismProperty); Object[] args = new Short[1]; args[0] = secme... |
System.out.println(msg +"EXCEPTION testSecurityMechanism() " + e.getMessage()); | System.out.println(msg +"EXCEPTION testSecurityMechanism() " + sqle.getMessage()); dumpSQLException(sqle.getNextException()); | public void testSecurityMechanism(String user, String password,Short secmec,String msg) { Connection conn; String securityMechanismProperty = "SecurityMechanism"; Class[] argType = { Short.TYPE }; String methodName = TestUtil.getSetterName(securityMechanismProperty); Object[] args = new Short[1]; args[0] = secme... |
catch (Exception e) { System.out.println("UNEXPECTED EXCEPTION!!!" +msg); e.printStackTrace(); } | public void testSecurityMechanism(String user, String password,Short secmec,String msg) { Connection conn; String securityMechanismProperty = "SecurityMechanism"; Class[] argType = { Short.TYPE }; String methodName = TestUtil.getSetterName(securityMechanismProperty); Object[] args = new Short[1]; args[0] = secme... | |
if (junitXASingle) jvmProps.addElement ("junit.xa.single=true"); | private static String[] buildTestCommand(String propString, String systemHome, String scriptPath) throws FileNotFoundException, IOException, Exception { //System.out.println("testType: " + testType); String ij = ""; // Create the test command line if (testType.equals("sql")) ij... | |
String junitXAProp = sp.getProperty ("junit.xa.single"); if (junitXAProp != null && junitXAProp.equals ("true")) { junitXASingle = true; } | private static JavaVersionHolder getProperties(Properties sp) throws Exception { // Get any properties specified on the command line searchCP = sp.getProperty("ij.searchClassPath"); String frameworkp = sp.getProperty("framework"); if (frameworkp != null) framework = frameworkp; if (fram... | |
markClosed(); connection_.openStatements_.remove(this); } if (resultSetMetaData_ != null) { resultSetMetaData_.markClosed(); resultSetMetaData_ = null; | markClosed(true); | public void closeX() throws SqlException { if (!openOnClient_) { return; } // Regardless of whether or not this statement is in the prepared state, // we need to close any open cursors for this statement on the server. int numberOfResultSetsToClose = (resultSetList_ == ... |
synchronized (connection_) { closeX(); } | markClosed(); | protected void finalize() throws java.lang.Throwable { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "finalize"); } if (openOnClient_) { synchronized (connection_) { closeX(); } } super.finalize(); } |
openOnClient_ = false; markResultSetsClosed(); removeClientCursorNameFromCache(); markPreparedStatementForAutoGeneratedKeysClosed(); markClosedOnServer(); | markClosed(false); | void markClosed() { openOnClient_ = false; markResultSetsClosed(); // in case a cursorName was set on the Statement but the Statement was // never used to execute a query, the cursorName will not be removed // when the resultSets are mark closed, so we need to remove the //... |
accumulateWarning(new SqlWarning(agent_.logWriter_, "Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor")); | accumulateWarning(new SqlWarning(agent_.logWriter_, new MessageId(SQLState.INSENSITIVE_UPDATABLE_NOT_SUPPORTED))); | private int downgradeResultSetConcurrency(int resultSetConcurrency, int resultSetType) { if (resultSetConcurrency == java.sql.ResultSet.CONCUR_UPDATABLE && resultSetType == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE) { accumulateWarning(new SqlWarning(agent_.logWriter_, "Insensitive... |
accumulateWarning(new SqlWarning(agent_.logWriter_, "Scroll sensitive result sets are not supported by server; remapping to forward-only cursor")); | accumulateWarning(new SqlWarning(agent_.logWriter_, new MessageId(SQLState.SCROLL_SENSITIVE_NOT_SUPPORTED))); | private int downgradeResultSetType(int resultSetType) { if (resultSetType == java.sql.ResultSet.TYPE_SCROLL_SENSITIVE) { accumulateWarning(new SqlWarning(agent_.logWriter_, "Scroll sensitive result sets are not supported by server; remapping to forward-only cursor")); return java.sql.Re... |
return warnings_; | return warnings_ == null ? null : warnings_.getSQLWarning(); | public java.sql.SQLWarning getWarnings() { if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getWarnings", warnings_); } return warnings_; } |
return (ColPermsDescriptor) getPermissions( key); | return getUncachedColPermsDescriptor( key ); | public ColPermsDescriptor getColumnPermissions( UUID colPermsUUID) throws StandardException { ColPermsDescriptor key = new ColPermsDescriptor( this, colPermsUUID); return (ColPermsDescriptor) getPermissions( key); } |
EmbeddedXADataSource dscsx = new EmbeddedXADataSource(); dscsx.setDatabaseName("wombat"); | Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); XADataSource dscsx = TestUtil.getXADataSource(attrs); | private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { EmbeddedXADataSource dscsx = new EmbeddedXADataSource(); dscsx.setDatabaseName("wombat"); XAConnection xac = dscsx.getXAConnection("fred", "wilma"); XAResource xr = xac.getXAResource(); Xid xid = getXid(25, (byte) 21... |
public ResultColumnList getAllResultColumns(String allTableName) | public ResultColumnList getAllResultColumns(TableName allTableName) | public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { /* We need special processing when there is a USING clause. * The resulting table will be the join columns from * the outer table followed by the non-join columns from * left side plus the non-join columns from the r... |
private ResultColumnList getAllResultColumnsNoUsing(String allTableName) | private ResultColumnList getAllResultColumnsNoUsing(TableName allTableName) | private ResultColumnList getAllResultColumnsNoUsing(String allTableName) throws StandardException { ResultColumnList leftRCL = leftResultSet.getAllResultColumns(allTableName); ResultColumnList rightRCL = rightResultSet.getAllResultColumns(allTableName); /* If allTableName is null, then we want to return the spl... |
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException | double optimizerEstimatedCost) throws StandardException | public ScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException { super(activation, resultSetNumber, optim... |
closeCleanup = c; | public ScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException { super(activation, resultSetNumber, optim... | |
if (closeCleanup != null) { closeCleanup.invoke(activation); } | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } currentRow = null; source.close(); if (ht != null) { ht.close(); ht = null; } super.clo... | |
getResourceTests(conn); | private static void readOnlyTest(DataSource ds) throws SQLException { try { Connection conn = ds.getConnection(); Statement s = conn.createStatement(); JDBC.assertFullResultSet( s.executeQuery("SELECT id, e_mail, ok from EMC.CONTACTS ORDER BY... | |
throw StandardException.newException( SQLState.SERVICE_DIRECTORY_CREATE_ERROR, dataDirectory, ioe); | throw StandardException.newException( SQLState.SERVICE_DIRECTORY_CREATE_ERROR, ioe, dataDirectory); | public void boot(boolean create, Properties startParams) throws StandardException { jbmsVersion = Monitor.getMonitor().getEngineVersion(); dataDirectory = startParams.getProperty(PersistentService.ROOT); UUIDFactory uf = Monitor.getMonitor().getUUIDFactory(); identifier = uf.createUUID(); PersistentService ... |
tableName = dd.getTableDescriptor(tableUUID).getName(); | if (tableUUID != null) tableName = dd.getTableDescriptor(tableUUID).getName(); | public TablePermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID tableUUID, String selectPriv, String deletePriv, ... |
if (RowUtil.isRowEmpty(this.init_startKeyValue, (FormatableBitSet) null)) | if (RowUtil.isRowEmpty(this.init_startKeyValue)) | private void initScanParams( DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier[][], DataValueDescriptor[] stopKeyValue, int stopSearchOperator) throws StandardException { // startKeyValue init. th... |
if (RowUtil.isRowEmpty(this.init_stopKeyValue, (FormatableBitSet) null)) | if (RowUtil.isRowEmpty(this.init_stopKeyValue)) | private void initScanParams( DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier[][], DataValueDescriptor[] stopKeyValue, int stopSearchOperator) throws StandardException { // startKeyValue init. th... |
setTransactionIsolationStmt = null; if (getTransactionIsolationStmt != null) { try { getTransactionIsolationStmt.close(); } catch (SQLException se) { accumulatedExceptions = Utils.accumulateSQLException( se, accumulatedExceptions); } } getTransactionIsolationStmt = null; | private void closeResourcesX() throws SQLException { try { checkForTransactionInProgress(); } catch ( SqlException e ) { throw e.getSQLException(); } resetConnectionAtFirstSql_ = false; // unset indicator of deferred reset SQLExce... | |
return isolation_; | autoCommit_ = false; if (getTransactionIsolationStmt == null || !(getTransactionIsolationStmt.openOnClient_ && getTransactionIsolationStmt.openOnServer_)) { getTransactionIsolationStmt = createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, holdability()); } rs = getTransa... | public int getTransactionIsolation() throws SQLException { try { checkForClosedConnection(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getTransactionIsolation", isolation_); } return isolation_; } catch ( ... |
finally { autoCommit_ = currentAutoCommit; if(rs != null) rs.close(); } return isolation_; | public int getTransactionIsolation() throws SQLException { try { checkForClosedConnection(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getTransactionIsolation", isolation_); } return isolation_; } catch ( ... | |
public JSQLType getJSQLType ( ) | public JSQLType getJSQLType () throws StandardException | public JSQLType getJSQLType ( ) { if ( jsqlType == null ) { if ( value.isParameterNode() ) { jsqlType = ((ParameterNode) value).getJSQLType(); } else { DataTypeDescriptor dtd = value.getTypeServices(); if (dtd != null) jsqlType = new JSQLType( dtd ); } } return jsqlType; } |
if ( value.isParameterNode() ) | if ( value.requiresTypeFromContext()) | public JSQLType getJSQLType ( ) { if ( jsqlType == null ) { if ( value.isParameterNode() ) { jsqlType = ((ParameterNode) value).getJSQLType(); } else { DataTypeDescriptor dtd = value.getTypeServices(); if (dtd != null) jsqlType = new JSQLType( dtd ); } } return jsqlType; } |
jsqlType = ((ParameterNode) value).getJSQLType(); | ParameterNode pn; if (value instanceof UnaryOperatorNode) pn = ((UnaryOperatorNode)value).getParameterOperand(); else pn = (ParameterNode) (value); jsqlType = pn.getJSQLType(); | public JSQLType getJSQLType ( ) { if ( jsqlType == null ) { if ( value.isParameterNode() ) { jsqlType = ((ParameterNode) value).getJSQLType(); } else { DataTypeDescriptor dtd = value.getTypeServices(); if (dtd != null) jsqlType = new JSQLType( dtd ); } } return jsqlType; } |
throws StandardException | public String getJavaTypeName() { JSQLType myType = getJSQLType(); if ( myType == null ) { return ""; } else { return mapToTypeID( myType ).getCorrespondingJavaTypeName(); } } | |
if (!JDBC.classpathHasXalanAndJAXP()) | if (!XML.classpathHasXalanAndJAXP()) | public static Test suite() { TestSuite suite = new TestSuite("XML Missing Classes Suite"); if (!JDBC.classpathHasXalanAndJAXP()) { // Run this test in embedded and client modes. suite.addTest(TestConfiguration.defaultSuite( XMLMissingClassesTest.class)); ... |
private String[] getContainerNames() | private synchronized String[] getContainerNames() | private String[] getContainerNames() { actionCode = GET_CONTAINER_NAMES_ACTION; try{ return (String[]) AccessController.doPrivileged( this); } catch( PrivilegedActionException pae){ return null;} } |
execCmdDumpResults(new String[]{IjCmd,(altExtinDir + sep + SqlDir + sep + jccSqlFile)}); execCmdDumpResults(new String[]{IjCmd,(SqlDir + sep + jccSqlFile)}); | ExecProcUtil.execCmdDumpResults(new String[]{IjCmd,(altExtinDir + sep + SqlDir + sep + jccSqlFile)},vCmd,bos); ExecProcUtil.execCmdDumpResults(new String[]{IjCmd,(SqlDir + sep + jccSqlFile)},vCmd,bos); | public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); sep = System.getProperty("file.s... |
execCmdDumpResults(new String[]{IjCmd,(altExtinDir + sep + SqlDir + sep + clientSqlFile)}); | ExecProcUtil.execCmdDumpResults(new String[]{IjCmd,(altExtinDir + sep + SqlDir + sep + clientSqlFile)},vCmd,bos); | public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); sep = System.getProperty("file.s... |
execCmdDumpResults(new String[]{IjCmd,(SqlDir + sep + clientSqlFile)}); | ExecProcUtil.execCmdDumpResults(new String[]{IjCmd,(SqlDir + sep + clientSqlFile)},vCmd,bos); | public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); sep = System.getProperty("file.s... |
tempPos -= (shiftSize - 1); for (int j = 0; j < bytesToShift; j++) { buffer_[tempPos + shiftSize] = buffer_[tempPos]; tempPos--; } tempPos += (shiftSize + 1); | tempPos -= (bytesToShift - 2); System.arraycopy(buffer_, tempPos - shiftSize, buffer_, tempPos , bytesToShift); | private final void compressBLayerData(int continueDssHeaderCount) throws org.apache.derby.client.am.DisconnectException { int tempPos = 0; // jump to the last continuation header. for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full dss ... |
case 9: String lStringA32672 = new String(Formatters.repeatChar("a",32672)); String lStringB32672 = new String(Formatters.repeatChar("b",32672)); String lStringC32672 = new String(Formatters.repeatChar("c",32672)); String lStringD32672 = new String(Formatters.repeatChar("d",32672)); insertInBig(conn, lStringA32672, lSt... | public static void bigTestData(int i) throws SQLException { Connection conn = DriverManager.getConnection("jdbc:default:connection"); switch (i) { case 1: String largeStringA10000 = new String(Formatters.repeatChar("a",10000)); String largeStringB10000 = new String(Formatters.repeatChar("b",10000)); Stri... | |
dd.dropAllTableAndColPermDescriptors(tableId, tc); | public void executeConstantAction( Activation activation ) throws StandardException { TableDescriptor td; UUID tableID; ConglomerateDescriptor[] cds; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependenc... | |
newHighestPage = CompressedNumber.readInt(in); num_pages_truncated = CompressedNumber.readInt(in); | if( !(this instanceof CompressSpacePageOperation10_2) ) { newHighestPage = in.readInt(); num_pages_truncated = CompressedNumber.readInt(in); } | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); newHighestPage = CompressedNumber.readInt(in); num_pages_truncated = CompressedNumber.readInt(in); } |
CompressedNumber.writeInt(out, newHighestPage); CompressedNumber.writeInt(out, num_pages_truncated); | if( !(this instanceof CompressSpacePageOperation10_2) ) { out.writeInt(newHighestPage); CompressedNumber.writeInt(out, num_pages_truncated); } | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); CompressedNumber.writeInt(out, newHighestPage); CompressedNumber.writeInt(out, num_pages_truncated); } |
public ScalarAggregateResultSet(NoPutResultSet s, | ScalarAggregateResultSet(NoPutResultSet s, | public ScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, Activation a, GeneratedMethod ra, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardE... |
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException | double optimizerEstimatedCost) throws StandardException | public ScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, Activation a, GeneratedMethod ra, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardE... |
super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost, c); | super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); | public ScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, Activation a, GeneratedMethod ra, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardE... |
if (closeCleanup != null) { closeCleanup.invoke(activation); } | 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(); if (clo... | |
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(); if (clo... | |
dd.updateSYSCOLPERMSforAddColumnToUserTable(td.getUUID(), tc); | private void addNewColumnToTable(Activation activation, int ix) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyManager(); TransactionController tc = lcc.getT... | |
if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getBoolean", result); } | public boolean getBoolean(int column) throws SQLException { try { closeCloseFilterInputStream(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBoolean", column); } checkGetterPreconditions(column); boolean re... | |
markClosed(); connection_.CommitAndRollbackListeners_.remove(this); | markClosed(true); | public final void closeX() throws SqlException { if (!openOnClient_) { return; } try { if (openOnServer_) { flowCloseAndAutoCommitIfNotAutoCommitted(); } else { statement_.resultSetCommitting(this); } } finally { ... |
openOnClient_ = false; openOnServer_ = false; statement_.resetCursorNameAndRemoveFromWhereCurrentOfMappings(); statement_.removeClientCursorNameFromCache(); markPositionedUpdateDeletePreparedStatementsClosed(); | markClosed(false); | void markClosed() { openOnClient_ = false; openOnServer_ = false; statement_.resetCursorNameAndRemoveFromWhereCurrentOfMappings(); // for SELECT...FOR UPDATE queries statement_.removeClientCursorNameFromCache(); markPositionedUpdateDeletePreparedStatementsClosed(); } |
childResult = childResult.modifyAccessPaths(); | childResult = childResult.modifyAccessPaths(restrictionList); | public Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException { boolean origChildOptimizable = true; /* It is okay to optimize most nodes multiple times. However, * modifying the access path is something that should only be done * once per node. One reason for this is that the predicate l... |
RemapCRsVisitor rcrv = new RemapCRsVisitor(true); ((Predicate) optimizablePredicate).getAndNode().accept(rcrv); | Predicate pred = (Predicate)optimizablePredicate; if (!pred.remapScopedPred()) { RemapCRsVisitor rcrv = new RemapCRsVisitor(true); pred.getAndNode().accept(rcrv); } | public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(optimizablePredicate instanceof Predicate, "optimizablePredicate expected to be instanceof Predicate"); SanityManager.ASSERT(! optimizablePredicate.hasSubquer... |
{ length += offset; if (length > bytes.length) { if (SanityManager.DEBUG) { agent.trace("DANGER - Expensive expansion of buffer"); } byte newBytes[] = new byte[Math.max (bytes.length << 1, length)]; System.arraycopy (bytes, 0, newBytes, 0, offset); bytes = newBytes; | { length += offset; if (length > bytes.length) { if (SanityManager.DEBUG) { agent.trace("DANGER - Expensive expansion of buffer"); | private void ensureLength (int length) { length += offset; if (length > bytes.length) { if (SanityManager.DEBUG) { agent.trace("DANGER - Expensive expansion of buffer"); } byte newBytes[] = new byte[Math.max (bytes.length << 1, length)]; System.arraycopy (bytes, 0, newBytes, 0, offset); bytes = newBy... |
} | private void ensureLength (int length) { length += offset; if (length > bytes.length) { if (SanityManager.DEBUG) { agent.trace("DANGER - Expensive expansion of buffer"); } byte newBytes[] = new byte[Math.max (bytes.length << 1, length)]; System.arraycopy (bytes, 0, newBytes, 0, offset); bytes = newBy... | |
for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; | for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } offset += extendedLengthByteCount; | private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } offset += extendedLengthByteCount; } |
offset += extendedLengthByteCount; } | private void writeExtendedLengthBytes (int extendedLengthByteCount, long length) { int shiftSize = (extendedLengthByteCount -1) * 8; for (int i = 0; i < extendedLengthByteCount; i++) { bytes[offset + i] = (byte) ((length >>> shiftSize) & 0xff); shiftSize -= 8; } offset += extendedLengthByteCount; } | |
{ try { writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING)); } catch (Exception e) { agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported"); } | { try { writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING)); } catch (Exception e) { agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported"); | protected void writeString(String s) throws DRDAProtocolException { try { writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING)); } catch (Exception e) { //this should never happen agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported"); } } |
} | protected void writeString(String s) throws DRDAProtocolException { try { writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING)); } catch (Exception e) { //this should never happen agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported"); } } | |
if (synctype == NetXAResource.XARETVAL_XARDONLY) { | if (synctype == XAResource.XA_RDONLY) { | protected int readXaPrepare(NetConnection conn) throws DisconnectException { startSameIdChainParse(); int synctype = parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; if (synctype == NetXAResource.XARE... |
System.out.println(lookupMessage("CSLOOK_Usage")); | System.out.println(lookupMessage("DBLOOK_Usage")); | public dblook(String[] args) { // Adjust the application in accordance with derby.ui.locale // and derby.ui.codeset langUtil = LocalizedResource.getInstance(); // Initialize class variables. initState(); // Parse the command line. if (!parseArgs(args)) { System.out.println(lookupMessage("CSLOOK_Usage"))... |
Logs.reportMessage("CSLOOK_FileCreation"); | Logs.reportMessage("DBLOOK_FileCreation"); | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
writeVerboseOutput("CSLOOK_OutputLocation", | writeVerboseOutput("DBLOOK_OutputLocation", | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
Logs.reportMessage("CSLOOK_Timestamp", | Logs.reportMessage("DBLOOK_Timestamp", | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
Logs.reportMessage("CSLOOK_DBName", sourceDBName); Logs.reportMessage("CSLOOK_DBUrl", sourceDBUrl); | Logs.reportMessage("DBLOOK_DBName", sourceDBName); Logs.reportMessage("DBLOOK_DBUrl", sourceDBUrl); | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
Logs.reportMessage("CSLOOK_TargetTables"); | Logs.reportMessage("DBLOOK_TargetTables"); | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
Logs.reportMessage("CSLOOK_TargetSchema", stripQuotes(schemaParam)); | Logs.reportMessage("DBLOOK_TargetSchema", stripQuotes(schemaParam)); | private void showVariables() { if (ddlFileName != null) { Logs.reportString("============================\n"); Logs.reportMessage("CSLOOK_FileCreation"); if (verbose) writeVerboseOutput("CSLOOK_OutputLocation", ddlFileName); } Logs.reportMessage("CSLOOK_Timestamp", new Timestamp(System.currentTimeMil... |
ps.execute(); | try { ResultSet rs = ps.executeQuery(); rs.next(); System.out.println("Jira 44 failed (didn't get SQLSTATE 22019)"); rs.close(); } catch (SQLException e) { if (!"22019".equals(e.getSQLState())) { System.out.println("Jira 44 failed."); e.printStackTrace(System.out); } } | public static void main(String[] args) { Connection con = null; Statement s; CallableStatement cs; PreparedStatement ps; ParameterMetaData paramMetaData; System.out.println("Test parameterMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection.... |
public DistinctGroupedAggregateResultSet(NoPutResultSet s, | DistinctGroupedAggregateResultSet(NoPutResultSet s, | public DistinctGroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMet... |
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException | double optimizerEstimatedCost) throws StandardException | public DistinctGroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMet... |
a, ra, maxRowSize, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost, c); | a, ra, maxRowSize, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); | public DistinctGroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMet... |
in_ = actualConn_.getInputStream(); out_ = actualConn_.getOutputStream(); | in_ = actualConn_.getNetConnection().getInputStream(); out_ = actualConn_.getNetConnection().getOutputStream(); | public void saveConnectionVariables() { in_ = actualConn_.getInputStream(); out_ = actualConn_.getOutputStream(); crrtkn_ = actualConn_.getCorrelatorToken(); } |
if (!checkVersion(RawStoreFactory.DERBY_STORE_MAJOR_VERSION_10, RawStoreFactory.DERBY_STORE_MINOR_VERSION_1)) maxLogFileNumber = LogCounter.DERBY_10_0_MAX_LOGFILE_NUMBER; | public void boot(boolean create, Properties startParams) throws StandardException { dataDirectory = startParams.getProperty(PersistentService.ROOT); logDevice = startParams.getProperty(Attribute.LOG_DEVICE); if( logDevice != null) { // in case the user specifies logDevice in URL form String... | |
if (logFileNumber+1 >= LogCounter.MAX_LOGFILE_NUMBER) | if (logFileNumber+1 >= maxLogFileNumber) | private void switchLogFile() throws StandardException { boolean switchedOver = false; ///////////////////////////////////////////////////// // Freeze the log for the switch over to a new log file. // This blocks out any other threads from sending log // record to the log stream. // // The switching of the log ... |
new Long(LogCounter.MAX_LOGFILE_NUMBER)); | new Long(maxLogFileNumber)); | private void switchLogFile() throws StandardException { boolean switchedOver = false; ///////////////////////////////////////////////////// // Freeze the log for the switch over to a new log file. // This blocks out any other threads from sending log // record to the log stream. // // The switching of the log ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.