rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
optimizerEstimatedCost, c);
optimizerEstimatedCost);
public DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEsti...
clientMessageIds.add(SQLState.MULTIPLE_RESULTS_ON_EXECUTE_QUERY); clientMessageIds.add(SQLState.USE_EXECUTE_UPDATE_WITH_NO_RESULTS);
static void initClientMessageIds() { // Add message ids that don't start with XJ here clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION); clientMessageIds.add(SQLState.NOT_IMPLEMENTED); clientMessageIds.add(SQLState.CANNOT_CLOSE_ACTIVE_CONNECTION); clientMessageIds.add(SQLSta...
separator + "CSJARS" + separator + schemaWithoutQuotes);
separator + "DBJARS" + separator + schemaWithoutQuotes);
public static void doJars(String dbName, Connection conn) throws SQLException { String separator = System.getProperty("file.separator"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT FILENAME, SCHEMAID, " + "GENERATIONID FROM SYS.SYSFILES"); boolean firstTime = true; while (...
boolean isDB2=false; String framework = System.getProperty("framework"); if (framework != null && framework.toUpperCase().equals("DB2JCC")) isDB2 = true;
public static void main (String[] argv) throws Throwable { boolean isDB2=false; String framework = System.getProperty("framework"); if (framework != null && framework.toUpperCase().equals("DB2JCC")) isDB2 = true; ij.getPropertyArg(argv); Connection conn = ij.startJBMS(); testCoalesceSyntax(conn); tablesForTes...
skipRemainder(false);
skipRemainder(true);
private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { skipRemainder(false); throw se; } }
conn.rollback();
public static void main (String args[]) { try { /* Load the JDBC Driver class */ // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Connection conn = ij.startJBMS(); createAndPopulateTable(conn); //set autocommit to off after creating table and in...
TestSuite suites = new TestSuite("StatementEventsTest suite"); boolean[] truefalse = new boolean[] { true, false }; for (boolean xa : truefalse) { for (boolean callable : truefalse) { suites.addTest(new Suite(xa, callable)); } } return suites;
TestSuite suite = new TestSuite("StatementEventsTest suite"); suite.addTest(baseSuite("StatementEventsTest:embedded")); return suite;
public static Test suite() { TestSuite suites = new TestSuite("StatementEventsTest suite"); boolean[] truefalse = new boolean[] { true, false }; for (boolean xa : truefalse) { for (boolean callable : truefalse) { suites.addTest(new Suite(xa, callable)); } ...
public void tearDown() throws SQLException {
protected void tearDown() throws Exception {
public void tearDown() throws SQLException { connection.close(); pooledConnection.close(); }
connection = null; pooledConnection = null; closedStatement = null; errorStatement = null; super.tearDown();
public void tearDown() throws SQLException { connection.close(); pooledConnection.close(); }
if (resultColumnType.getTypeId().isXMLTypeId()) return false;
boolean columnTypeAndLengthMatch() throws StandardException { DataTypeDescriptor resultColumnType; DataTypeDescriptor expressionType = expression.getTypeServices(); /* ** We can never make any assumptions about ** parameters. So don't even bother in this ** case. */ if (expression.requiresTypeFromContext()) ...
if (groupmask != 0 || tranId != null) { if (groupmask != 0 && (groupmask & lr.group()) == 0)
if(lr.isChecksum()) { candidate = false; }else if (groupmask != 0 || tranId != null) { if(lr.isChecksum()) candidate = false; if (candidate && groupmask != 0 && (groupmask & lr.group()) == 0)
private LogRecord getNextRecordBackward(ArrayInputStream input, TransactionId tranId, int groupmask) throws StandardException, IOException, ClassNotFoundException { if (SanityManager.DEBUG) SanityManager.ASSERT(scanDirection == BACKWARD, "can only called by backward scan"); // scan is pos...
if(lr.isChecksum()) { candidate = false; Loggable op = lr.getLoggable(); if (SanityManager.DEBUG) { if (SanityManager.DEBUG_ON(LogToFile.DUMP_LOG_ONLY) || SanityManager.DEBUG_ON(LogToFile.DBG_FLAG)) SanityManager.DEBUG(LogToFile.DBG_FLAG, "scanned " + "Null" + " : " + op + " instant = " + LogCounter.toDebugString(c...
private LogRecord getNextRecordForward(ArrayInputStream input, TransactionId tranId, int groupmask) throws StandardException, IOException, ClassNotFoundException { if (SanityManager.DEBUG) SanityManager.ASSERT(scanDirection == FORWARD, "can only called by forward scan"); // NOTE: // // if...
public void exec(File srcFile, File dstFile, InputStream isSed, boolean isJCC, boolean isI18N)
public void exec (File srcFile, File dstFile, InputStream isSed, boolean isJCC, boolean isI18N, boolean isJDBC4)
public void exec(File srcFile, File dstFile, InputStream isSed, boolean isJCC, boolean isI18N) throws IOException { String hostName = TestUtil.getHostName(); // Vector for storing lines to be deleted Vector deleteLines = new Vector(); deleteLines.addElement("^ij version.*$");...
doWork(srcFile, dstFile, null, deleteLines, searchStrings, subStrings, isSed, isI18N);
if ( isJDBC4 ) { subStrings.addElement(SQL_EXCEPTION_FILTERED_SUBSTITUTION); subStrings.addElement(SQL_EXCEPTION_FILTERED_SUBSTITUTION); subStrings.addElement(SQL_EXCEPTION_FILTERED_SUBSTITUTION); subStrings.addElement(SQL_EXCEPTION_FILTERED_SUBSTITUTION); subStrings.addElement(SQL_EXCEPTION_FILTERED_SUBSTITUTION); sub...
public void exec(File srcFile, File dstFile, InputStream isSed, boolean isJCC, boolean isI18N) throws IOException { String hostName = TestUtil.getHostName(); // Vector for storing lines to be deleted Vector deleteLines = new Vector(); deleteLines.addElement("^ij version.*$");...
new Sed().exec(src,tgt,null, false, false);
new Sed().exec(src,tgt,null, false, false,false);
public static void main(String[] args) throws Exception { if (args == null || args.length != 2) { System.err.println("Usage: Sed sourcefile targetfile"); System.exit(1); } File src = new File(args[0]); File tgt = new File(args[1]); new Sed().exec(src,tgt,null...
getBody().run(context, output);
public void doTag(XMLOutput output) throws Exception { Destination destination = getDestination(); if ( destination == null ) { throw new JellyException( "No destination specified. Either specify a 'destination' attribute or use a nested <jms:destination> tag" ); } Message mes...
throw newSQLException(SQLState.NOT_POSITIONED_ON_INSERT_ROW);
throw newSQLException(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW);
protected void checksBeforeInsert() throws SQLException { // 1)Make sure JDBC ResultSet is not closed checkIfClosed("insertRow"); // 2)Make sure this is an updatable ResultSet // if not updatable resultset, then throw exception checkUpdatableCursor("insertRow"); // 3)Make s...
public TypeDescriptorImpl( BaseTypeIdImpl typeId, int precision, int scale, boolean isNullable, int maximumWidth) { this.typeId = typeId; this.precision = precision; this.scale = scale; this.isNullable = isNullable; this.maximumWidth = maximumWidth; }
public TypeDescriptorImpl() {}
public TypeDescriptorImpl( BaseTypeIdImpl typeId, int precision, int scale, boolean isNullable, int maximumWidth) { this.typeId = typeId; this.precision = precision; this.scale = scale; this.isNullable = isNullable; this.maximumWidth = maximumWidth; }
actionSPSId = (actionSPSId == null) ? dd.getUUIDFactory().createUUID() : actionSPSId;
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
if (whenText != null) { whenspsd = createSPS(lcc, ddg, dd, tc, tmpTriggerId, triggerSd, whenSPSId, spsCompSchemaId, whenText, true, triggerTable); }
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
** Create the trigger action
** Create the trigger descriptor first so the trigger action ** compilation can pick up the relevant trigger especially in ** the case of self triggering.
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
actionspsd = createSPS(lcc, ddg, dd, tc, tmpTriggerId, triggerSd, actionSPSId, spsCompSchemaId, actionText, false, triggerTable); TriggerDescriptor triggerd =
TriggerDescriptor triggerd =
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
actionspsd.getUUID(),
actionSPSId,
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
if (whenText != null) { whenspsd = createSPS(lcc, ddg, dd, tc, tmpTriggerId, triggerSd, whenSPSId, spsCompSchemaId, whenText, true, triggerTable); } actionspsd = createSPS(lcc, ddg, dd, tc, tmpTriggerId, triggerSd, actionSPSId, spsCompSchemaId, actionText, false, triggerTable);
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
new RawToBinaryFormatStream(x, (int) length), (int) length);
rawStream, (int) length);
private void updateBinaryStreamInternal(int columnIndex, InputStream x, final boolean lengthLess, long length, String updateMethodName) throws SQLException { if (!lengthLess) { if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); ...
int colWidth = resultDescription.getColumnDescriptor( columnIndex).getType().getMaximumWidth();
int colWidth = getMaxColumnWidth(columnIndex);
private void updateCharacterStreamInternal(int columnIndex, Reader reader, final boolean lengthLess, long length, String updateMethodName) throws SQLException { try {...
reader, usableLength, truncationLength); } else { utfIn = new ReaderToUTF8Stream( reader, ReaderToUTF8Stream.UNKNOWN_LENGTH, 0);
reader, colWidth, getColumnSQLType(columnIndex));
private void updateCharacterStreamInternal(int columnIndex, Reader reader, final boolean lengthLess, long length, String updateMethodName) throws SQLException { try {...
ps.setQueryTimeout(0L);
private static void executeUpdate(LanguageConnectionContext lcc, String updateStmt) throws StandardException { PreparedStatement ps = lcc.prepareInternalStatement(updateStmt); ResultSet rs = ps.execute(lcc, true); rs.close(); rs.finish(); }
ps.setQueryTimeout(0L);
private long getColumnMax(Activation activation, TableDescriptor td, String columnName, long increment, long initial) throws StandardException { String maxStr = (increment > 0) ? "MAX" : "MIN"; String maxStmt = "SELECT " + maxStr + "(\"" + columnName + "\")" + "FROM \"" + td.getSchemaName() + "\...
if (privType == Authorizer.MODIFY_SCHEMA_PRIV)
switch ( privType )
public void check( LanguageConnectionContext lcc, String authid, boolean forGrant) throws StandardException { DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransactionExecute(); if (privType == Authorizer.MODIFY_SCHEMA_PRIV) { SchemaDescriptor sd = dd.getSchemaDesc...
SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, false); if (sd == null) return;
case Authorizer.MODIFY_SCHEMA_PRIV: case Authorizer.DROP_SCHEMA_PRIV: SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, false); if (sd == null) return;
public void check( LanguageConnectionContext lcc, String authid, boolean forGrant) throws StandardException { DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransactionExecute(); if (privType == Authorizer.MODIFY_SCHEMA_PRIV) { SchemaDescriptor sd = dd.getSchemaDesc...
if (!authid.equals(sd.getAuthorizationId())) throw StandardException.newException( SQLState.AUTH_NO_ACCESS_NOT_OWNER, authid, schemaName); } else { if (!schemaName.equals(authid) || (aid != null && !aid.equals(authid))) throw StandardException.newException( SQLState.AUTH_NOT_DATABASE_OWNER, authid, schemaName);
if (!authid.equals(sd.getAuthorizationId())) throw StandardException.newException( SQLState.AUTH_NO_ACCESS_NOT_OWNER, authid, schemaName); break; case Authorizer.CREATE_SCHEMA_PRIV: if ( !schemaName.equals(authid) || (aid != null && !aid.equals(authid)) ) throw StandardException.newException( SQLState.AUTH_NOT_DATA...
public void check( LanguageConnectionContext lcc, String authid, boolean forGrant) throws StandardException { DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransactionExecute(); if (privType == Authorizer.MODIFY_SCHEMA_PRIV) { SchemaDescriptor sd = dd.getSchemaDesc...
getCompilerContext().addRequiredRoutinePriv(ad);
public JavaValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // for a function we can get called recursively if (alreadyBound) return this; bindParameters(fromList, subqueryList, aggregateVector); /* If javaClassName is null then we ...
char[] b = {(char)20, (char)20, (char)20}; String errSeparator = new String(b);
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; ...
if (sqlerrmc.indexOf(errSeparator, index) == -1)
if (sqlerrmc.indexOf(SQLERRMC_MESSAGE_DELIMITER, index) == -1)
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; ...
index = sqlerrmc.indexOf(errSeparator, index) + errSeparator.length();
index = sqlerrmc.indexOf(SQLERRMC_MESSAGE_DELIMITER, index) + SQLERRMC_MESSAGE_DELIMITER.length();
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; ...
endIdx = sqlerrmc.indexOf(errSeparator, startIdx);
endIdx = sqlerrmc.indexOf(SQLERRMC_MESSAGE_DELIMITER, startIdx);
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; ...
startIdx = endIdx + errSeparator.length();
startIdx = endIdx + SQLERRMC_MESSAGE_DELIMITER.length();
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; ...
closeCloseFilterInputStream();
public java.sql.Array getArray(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getArray", column); } checkGetterPreconditions(column); java.sql.Array result = isNull(column) ? null : cursor_.getArray(column); if (true...
return result;
return createCloseFilterInputStream(result);
public java.io.InputStream getAsciiStream(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getAsciiStream", column); } checkGetterPreconditions(column); java.io.InputStream result = null; if (wasNonNullSensitiveUpdate(...
closeCloseFilterInputStream();
public java.math.BigDecimal getBigDecimal(int column, int scale) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getBigDecimal", column, scale); } checkGetterPreconditions(column); java.math.BigDecimal result = null; if...
return result;
return createCloseFilterInputStream(result);
public java.io.InputStream getBinaryStream(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBinaryStream", column); } checkGetterPreconditions(column); java.io.InputStream result = null; if (wasNonNullSensitiveUpdat...
closeCloseFilterInputStream();
public java.sql.Blob getBlob(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBlob", column); } checkGetterPreconditions(column); java.sql.Blob result = null; if (wasNonNullSensitiveUpdate(column)) { resu...
closeCloseFilterInputStream();
public boolean getBoolean(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBoolean", column); } checkGetterPreconditions(column); boolean result = false; if (wasNonNullSensitiveUpdate(column)) { result = ...
closeCloseFilterInputStream();
public byte getByte(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getByte", column); } checkGetterPreconditions(column); byte result = 0; if (wasNonNullSensitiveUpdate(column)) { result = agent_.crossConv...
closeCloseFilterInputStream();
public byte[] getBytes(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBytes", column); } checkGetterPreconditions(column); byte[] result = null; if (wasNonNullSensitiveUpdate(column)) { result = (byte[]...
closeCloseFilterInputStream();
public java.io.Reader getCharacterStream(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getCharacterStream", column); } checkGetterPreconditions(column); java.io.Reader result = null; if (wasNonNullSensitiveUpdate(co...
closeCloseFilterInputStream();
public java.sql.Clob getClob(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getClob", column); } checkGetterPreconditions(column); java.sql.Clob result = null; if (wasNonNullSensitiveUpdate(column)) { resu...
closeCloseFilterInputStream();
public java.sql.Date getDate(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getDate", column); } checkGetterPreconditions(column); java.sql.Date result = null; if (wasNonNullSensitiveUpdate(column)) { resu...
closeCloseFilterInputStream();
public double getDouble(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getDouble", column); } checkGetterPreconditions(column); double result = 0; if (wasNonNullSensitiveUpdate(column)) { result = ((Double...
closeCloseFilterInputStream();
public float getFloat(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getFloat", column); } checkGetterPreconditions(column); float result = 0; if (wasNonNullSensitiveUpdate(column)) { result = ((Float) age...
closeCloseFilterInputStream();
public int getInt(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getInt", column); } checkGetterPreconditions(column); int result = 0; if (wasNonNullSensitiveUpdate(column)) { result = ((Integer) agent_.cr...
closeCloseFilterInputStream();
public long getLong(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getLong", column); } checkGetterPreconditions(column); long result = 0; if (wasNonNullSensitiveUpdate(column)) { result = ((Long) agent_.c...
closeCloseFilterInputStream();
public Object getObject(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getObject", column); } Object result = getObjectX(column); if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getObject", resu...
closeCloseFilterInputStream();
public java.sql.Ref getRef(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getRef", column); } checkGetterPreconditions(column); java.sql.Ref result = isNull(column) ? null : cursor_.getRef(column); if (true) { ...
closeCloseFilterInputStream();
public short getShort(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getShort", column); } checkGetterPreconditions(column); short result = 0; if (wasNonNullSensitiveUpdate(column)) { result = ((Short) age...
closeCloseFilterInputStream();
public String getString(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getString", column); } checkGetterPreconditions(column); String result = null; if (wasNonNullSensitiveUpdate(column)) { result = (Stri...
closeCloseFilterInputStream();
public java.sql.Time getTime(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getTime", column); } checkGetterPreconditions(column); java.sql.Time result = null; if (wasNonNullSensitiveUpdate(column)) { resu...
closeCloseFilterInputStream();
public java.sql.Timestamp getTimestamp(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getTimestamp", column); } checkGetterPreconditions(column); java.sql.Timestamp result = null; if (wasNonNullSensitiveUpdate(column...
return result;
return createCloseFilterInputStream(result);
public java.io.InputStream getUnicodeStream(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getUnicodeStream", column); } checkGetterPreconditions(column); java.io.InputStream result = null; if (wasNonNullSe...
}
public void pullOptPredicates( OptimizablePredicateList optimizablePredicates) throws StandardException { if (pushedPredicates == null) // we didn't push anything, so nothing to pull. return; // It's possible that we tried to push a predicate down to this // SetOperatorNode's children but weren't actually able...
BinaryRelationalOperatorNode opNode = (BinaryRelationalOperatorNode)pred.getAndNode().getLeftOperand(); boolean opWasRemapped = ((ColumnReference)opNode.getLeftOperand()).hasBeenRemapped(); RemapCRsVisitor rcrv = null; if (opWasRemapped) { rcrv = new RemapCRsVisitor(false); pred.getAndNode().accept(rcrv); }
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException { // This method was added to SetOperatorNode as part of DERBY-805, // which was only targeted for UnionNodes. So for now, we don't // do anything if "this" isn't a Union. This check can be removed // when suppor...
tableNums, leftResultSet);
tableNums, leftResultSet, whichRC);
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException { // This method was added to SetOperatorNode as part of DERBY-805, // which was only targeted for UnionNodes. So for now, we don't // do anything if "this" isn't a Union. This check can be removed // when suppor...
tableNums, rightResultSet);
tableNums, rightResultSet, whichRC);
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException { // This method was added to SetOperatorNode as part of DERBY-805, // which was only targeted for UnionNodes. So for now, we don't // do anything if "this" isn't a Union. This check can be removed // when suppor...
if (opWasRemapped) { rcrv = new RemapCRsVisitor(true); pred.getAndNode().accept(rcrv); }
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException { // This method was added to SetOperatorNode as part of DERBY-805, // which was only targeted for UnionNodes. So for now, we don't // do anything if "this" isn't a Union. This check can be removed // when suppor...
Class [] a = new Class [] { s, s, s };
public void runTest() { DatabaseMetaData met; ResultSet rs; ResultSetMetaData rsmet; System.out.println("Test metadata starting"); try { //Cleanup any leftover database objects from previous test run cleanUp(s); // test decimal type and other numeric types precision, scale, // and display width after ope...
met.getClass().getMethod("getFunctions", a);
met.getClass().getMethod("getFunctions", new Class [] { s, s, s });
public void runTest() { DatabaseMetaData met; ResultSet rs; ResultSetMetaData rsmet; System.out.println("Test metadata starting"); try { //Cleanup any leftover database objects from previous test run cleanUp(s); // test decimal type and other numeric types precision, scale, // and display width after ope...
dumpRS(0, (ResultSet)gf.
dumpRS(IGNORE_PROC_ID, (ResultSet)gf.
public void runTest() { DatabaseMetaData met; ResultSet rs; ResultSetMetaData rsmet; System.out.println("Test metadata starting"); try { //Cleanup any leftover database objects from previous test run cleanUp(s); // test decimal type and other numeric types precision, scale, // and display width after ope...
catch (NoSuchMethodException e) {}
catch (NoSuchMethodException e) { if (org.apache.derby.iapi.services.info.JVMInfo.JDK_ID >= org.apache.derby.iapi.services.info.JVMInfo.J2SE_16) { e.printStackTrace(); } }
public void runTest() { DatabaseMetaData met; ResultSet rs; ResultSetMetaData rsmet; System.out.println("Test metadata starting"); try { //Cleanup any leftover database objects from previous test run cleanUp(s); // test decimal type and other numeric types precision, scale, // and display width after ope...
final void writeEncryptedScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException {
final private void writeEncryptedScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException {
final void writeEncryptedScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException { int leftToR...
final void writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException {
final private void writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException {
final void writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException { int leftToRead = length; int exten...
if(!writeChecksum) return 0;
protected long reserveSpaceForChecksum(int length, long logFileNumber, long currentPosition ) throws StandardException, IOException { if(!writeChecksum) return 0; int total_log_record_length = length + LOG_RECORD_FIXED_OVERHEAD_SIZE; boolean reserveChecksumSpace = false; /* checksum log record is calculated ...
reserveChecksumSpace = true;
reserveChecksumSpace = writeChecksum;
protected long reserveSpaceForChecksum(int length, long logFileNumber, long currentPosition ) throws StandardException, IOException { if(!writeChecksum) return 0; int total_log_record_length = length + LOG_RECORD_FIXED_OVERHEAD_SIZE; boolean reserveChecksumSpace = false; /* checksum log record is calculated ...
if (TestUtil.isEmbeddedFramework()) { System.out.println("Notice that connection's holdability at this point is CLOSE_CURSORS_AT_COMMIT because it is part of the global transaction"); System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); }
System.out.println("Notice that connection's holdability at this point is CLOSE_CURSORS_AT_COMMIT because it is part of the global transaction"); System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT));
private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); attrs.setProperty("connectionAttributes", "create=true"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = ...
if (TestUtil.isEmbeddedFramework()) { System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); }
System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT));
private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); attrs.setProperty("connectionAttributes", "create=true"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = ...
if (TestUtil.isEmbeddedFramework())
if (! stmtHoldabilityError)
private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); attrs.setProperty("connectionAttributes", "create=true"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = ...
if (!TestUtil.isEmbeddedFramework()) { conn.close(); return; }
private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); attrs.setProperty("connectionAttributes", "create=true"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = ...
System.out.println("STATEMENT HOLDABILITY " + (sh.getResultSetHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); sh.executeQuery("select id from hold_30").close(); sh.execute("select id from hold_30"); sh.getResultSet().close(); System.out.println("PREPARED STATEMENT HOLDABILITY " + (psh.getResultSetHoldability() ...
if(! stmtHoldabilityError) { System.out.println("STATEMENT HOLDABILITY " + (sh.getResultSetHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); sh.executeQuery("select id from hold_30").close(); sh.execute("select id from hold_30"); sh.getResultSet().close(); System.out.println("PREPARED STATEMENT HOLDABILITY " + (p...
private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); attrs.setProperty("connectionAttributes", "create=true"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = ...
try { closeCloseFilterInputStream();
if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getUnicodeStream", column); }
public java.io.InputStream getUnicodeStream(int column) throws SQLException { try { closeCloseFilterInputStream(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getUnicodeStream", column); } checkGetterPreconditi...
if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getUnicodeStream", column); } checkGetterPreconditions(column); useStream(column); java.io.InputStream result = null; if (wasNonNullSensitiveUpdate(column)) { try { result = new java.io.ByteArrayInputStream (((String) agent_.crossConverters_...
throw SQLExceptionFactory.notImplemented ("getUnicodeStream");
public java.io.InputStream getUnicodeStream(int column) throws SQLException { try { closeCloseFilterInputStream(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getUnicodeStream", column); } checkGetterPreconditi...
Class theClass = getClass().getClassLoader().loadClass( className ); if (theClass == null ) { theClass = Thread.currentThread().getContextClassLoader().loadClass( className );
ClassLoader loader = getClass().getClassLoader(); if (loader != null) { try { return loader.loadClass( className ); } catch (ClassNotFoundException e) { }
protected Class loadClass() throws ClassNotFoundException { Class theClass = getClass().getClassLoader().loadClass( className ); if (theClass == null ) { theClass = Thread.currentThread().getContextClassLoader().loadClass( className ); } return theClass; }
return theClass;
return getClass().getClassLoader().loadClass( className );
protected Class loadClass() throws ClassNotFoundException { Class theClass = getClass().getClassLoader().loadClass( className ); if (theClass == null ) { theClass = Thread.currentThread().getContextClassLoader().loadClass( className ); } return theClass; }
throw StandardException.newException(SQLState.AUTH_INVALID_AUTHORIZATION_PROPERTY, key,value_s,se);
throw StandardException.newException(SQLState.AUTH_INVALID_AUTHORIZATION_PROPERTY, se, key,value_s);
public boolean validate(String key, Serializable value, Dictionary p) throws StandardException { if (value == null) return true; else if (key.equals(Property.DEFAULT_CONNECTION_MODE_PROPERTY)) { String value_s = (String)value; if (value_s != null && !StringUtil.SQLEqualsIgnoreCase(value_s, Pro...
numArgs = 26;
numArgs = 25;
public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca...
numArgs = 25;
numArgs = 24 ;
public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca...
if (likeNode.getLeftOperand().isParameterNode())
if (likeNode.getLeftOperand().requiresTypeFromContext())
public CostEstimate estimateCost(OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, RowOrdering rowOrdering) throws StandardException { double cost; boolean statisticsForTable = false; boolean statisticsForConglomerate = false...
if (startParams == null) return false;
public boolean canSupport(Properties startParams) { String impl = startParams.getProperty("derby.access.Conglomerate.type"); if (impl == null) return false; return supportsImplementation(impl); }
cStmt = con.prepareCall("values 1");
cStmt = con.prepareCall("? = CALL FLOOR(?)"); cStmt.registerOutParameter(1, Types.DOUBLE);
public void setUp() throws SQLException { con = getConnection(); cStmt = con.prepareCall("values 1"); }
return (new TestSuite(CallableStatementTest.class, "CallableStatementTest suite"));
TestSuite suite = new TestSuite(CallableStatementTest.class, "CallableStatementTest suite"); return new CallableStatementTestSetup(suite);
public static Test suite() { return (new TestSuite(CallableStatementTest.class, "CallableStatementTest suite")); }
hashKeyItem, tableName, indexName, isConstraint,
hashKeyItem, tableName, userSuppliedOptimizerOverrides, indexName, isConstraint,
public DistinctScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, int hashKeyItem, String tableName, String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationL...
super(logWriter, "Invalid data conversion:" + "Requested conversion would result in a loss of precision of " + instance);
super(logWriter, new MessageId(SQLState.LOSS_OF_PRECISION_EXCEPTION), instance);
LossOfPrecisionConversionException(LogWriter logWriter, String instance) { super(logWriter, "Invalid data conversion:" + "Requested conversion would result in a loss of precision of " + instance); }
batchPositionLabel_ = "Error for batch element #" + index + ": ";
batchPositionLabel_ = msgutil_.getTextMessage(BATCH_POSITION_ID) + index + ": ";
void setBatchPositionLabel(int index) { batchPositionLabel_ = "Error for batch element #" + index + ": "; }
causeString_ = " Caused by exception " +
causeString_ = " " + msgutil_.getTextMessage(CAUSED_BY_EXCEPTION_ID) + " " +
protected void setThrowable(Throwable throwable) { throwable_ = throwable; // If the throwable is a SQL exception, use nextException rather // than chained exceptions if ( throwable instanceof SqlException ) { setNextException((SqlException) throwable); ...
return getPrecision(getBigDecimal());
if (isNull()) return 0; BigDecimal localValue = getBigDecimal(); return SQLDecimal.getWholeDigits(localValue) + getDecimalValueScale();
public int getDecimalValuePrecision() { return getPrecision(getBigDecimal()); }
BigDecimal localValue = getBigDecimal(); return (localValue == null) ? 0 : localValue.scale();
if (isNull()) return 0; if (value == null) return rawScale; int scale = value.scale(); if (scale >= 0) return scale; return 0;
public int getDecimalValueScale() { BigDecimal localValue = getBigDecimal(); return (localValue == null) ? 0 : localValue.scale(); }
private int getWholeDigits()
private static int getWholeDigits(BigDecimal decimalValue)
private int getWholeDigits() { return SQLDecimal.getWholeDigits(getBigDecimal()); }
return SQLDecimal.getWholeDigits(getBigDecimal());
decimalValue = decimalValue.abs(); if (ONE.compareTo(decimalValue) == 1) { return 0; } if (JVMInfo.JDK_ID >= JVMInfo.J2SE_15) { try { int precision = ((Integer) bdPrecision.invoke(decimalValue, null)).intValue(); return precision - decimalValue.scale(); } catch (IllegalAccessException e) { throw new IllegalAcce...
private int getWholeDigits() { return SQLDecimal.getWholeDigits(getBigDecimal()); }
((desiredPrecision - desiredScale) < getWholeDigits()))
((desiredPrecision - desiredScale) < SQLDecimal.getWholeDigits(getBigDecimal())))
public DataValueDescriptor setWidth(int desiredPrecision, int desiredScale, boolean errorOnTrunc) throws StandardException { if (isNull()) return this; // the getWholeDigits() call will ensure via getBigDecimal() // that the rawData is translated into the BigDecimal in value. if (desiredPrecision != I...
if (SanityManager.DEBUG) { if (scale < 0) SanityManager.THROWASSERT("DECIMAL scale at writeExternal is negative " + scale + " value " + toString()); }
public void writeExternal(ObjectOutput out) throws IOException { // never called when value is null if (SanityManager.DEBUG) SanityManager.ASSERT(! isNull()); int scale; byte[] byteArray; if (value != null) { scale = value.scale(); BigInteger bi = value.unscaledValue(); byteArray = bi.toByteArray(); } e...
execCmdDumpResults(RuntimeinfoCmd);
ExecProcUtil.execCmdDumpResults(RuntimeinfoCmd,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(); try { ij.getPropertyArg(args);...