rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
verifyKeyFile.readFully(data);
dis.readFully(data);
public void verifyKey(boolean create, StorageFactory sf, Properties properties) throws StandardException { if(properties.getProperty(Attribute.CRYPTO_EXTERNAL_KEY) == null) return; // if firstTime ( ie during creation of database, initial key used ) // In order to allow for verifying the external key for future ...
if (verifyKeyInputStream != null ) verifyKeyInputStream.close();
public void verifyKey(boolean create, StorageFactory sf, Properties properties) throws StandardException { if(properties.getProperty(Attribute.CRYPTO_EXTERNAL_KEY) == null) return; // if firstTime ( ie during creation of database, initial key used ) // In order to allow for verifying the external key for future ...
false);
true);
public Cacheable setIdentity(Object key) throws StandardException { // If the user does not have permission then cache an empty (no permission) descriptor in // case the same user asks again. That is particularly important for table permission because // we ask about table permission before column permissions. If a...
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc)
public SchemaDescriptor getSchemaDescriptor(String schemaName, TransactionController tc, boolean raiseError)
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
SchemaDescriptor sd = null;
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
if (schemaId != null)
if (getSystemSchemaDescriptor().getSchemaName().equals(schemaName))
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
if (getSystemSchemaDescriptor().getUUID().equals(schemaId)) { return getSystemSchemaDescriptor(); } else if (getSysIBMSchemaDescriptor().getUUID().equals(schemaId)) {
return getSystemSchemaDescriptor(); } else if (getSysIBMSchemaDescriptor().getSchemaName().equals(schemaName)) { if (dictionaryVersion.checkVersion( DataDictionary.DD_VERSION_CS_5_2, null)) {
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
** If we aren't booting, lets see if we already ** have the descriptor. If we are in the middle ** of booting we cannot get the LanguageConnectionContext.
** Manual lookup
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
if (!booting)
SchemaDescriptor sd = locateSchemaRow(schemaName, tc); if (sd == null && getDeclaredGlobalTemporaryTablesSchemaDescriptor().getSchemaName().equals(schemaName)) { return getDeclaredGlobalTemporaryTablesSchemaDescriptor(); } if (sd == null && raiseError)
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
LanguageConnectionContext lcc = getLCC(); if (lcc != null) { sd = lcc.getDefaultSchema(); if ((sd != null) && ((schemaId == null) || schemaId.equals(sd.getUUID()))) { return sd; } }
throw StandardException.newException( SQLState.LANG_SCHEMA_DOES_NOT_EXIST, schemaName);
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
return locateSchemaRow(schemaId, tc);
else { return sd; }
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException { SchemaDescriptor sd = null; if ( tc == null ) { tc = getTransactionCompile(); } /* ** Check for APP and SYS schemas before going any ** further. */ if (schemaId != null) { ...
if ((pos.current_page.nonDeletedRecordCount() == 0) || ((pos.current_page.nonDeletedRecordCount() == 1) && (pos.current_page.getPageNumber() == ContainerHandle.FIRST_PAGE_NUMBER)))
if (pos.current_page.shouldReclaimSpace( pos.current_page.getPageNumber() == 1 ? 1 : 0, pos.current_slot))
public boolean delete(RowLocation loc) throws StandardException { if (open_conglom.isClosed()) { if (open_conglom.getHold()) { if (open_conglom.isClosed()) open_conglom.reopen(); } else { throw( ...
if( SanityManager.DEBUG) { Exception ex = pae.getException(); SanityManager.THROWASSERT( ex.getClass().getName() + " thrown while getting the canonical name: " + ex.getMessage()); } return null; }
throw Monitor.exceptionStartingModule(pae.getException()); }
public String getCanonicalServiceName(String name) { String protocolLeadIn = getType() + ":"; int colon = name.indexOf( ':'); if( colon > 1) // Subsubprotocols must be at least 2 characters long { if( ! name.startsWith( protocolLeadIn)) return null; // It is not our d...
} catch (StandardException se) { return false; }
public boolean isSameService(String serviceName1, String serviceName2) { if (SanityManager.DEBUG) { SanityManager.ASSERT(serviceName1.equals(getCanonicalServiceName(serviceName1)), serviceName1); SanityManager.ASSERT(serviceName2.equals(getCanonicalServiceName(serviceName2)), serviceName2); } ...
public PageBasicOperation()
protected PageBasicOperation(BasePage page)
public PageBasicOperation() { }
if (SanityManager.DEBUG) { SanityManager.ASSERT( page != null, "cannot create page operation on a null page pointer"); } this.page = page; pageId = page.getPageId(); pageVersion = page.getPageVersion();
public PageBasicOperation() { }
public LogicalUndoOperation(BasePage page, int recordId, LogicalPageOperation op)
protected LogicalUndoOperation(BasePage page)
public LogicalUndoOperation(BasePage page, int recordId, LogicalPageOperation op) { super(page); undoOp = op; this.recordId = recordId; }
undoOp = op; this.recordId = recordId;
public LogicalUndoOperation(BasePage page, int recordId, LogicalPageOperation op) { super(page); undoOp = op; this.recordId = recordId; }
public Level2CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount)
public Level2CostEstimateImpl()
public Level2CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount) { super(theCost, theRowCount, theSingleScanRowCount); }
super(theCost, theRowCount, theSingleScanRowCount);
public Level2CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount) { super(theCost, theRowCount, theSingleScanRowCount); }
addOrLoadBestPlanMapping(true, this);
updateBestPlanMap(ADD_PLAN, this);
public CostEstimate optimizeIt( Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException { optimizer.trace(Optimizer.CALLING_ON_JOIN_NODE, 0, 0, 0.0, null); // It's possible that a call to optimize the left/right will ...
for (Enumeration enum = resultSetVector.elements(); enum.hasMoreElements(); )
for (Enumeration e = resultSetVector.elements(); e.hasMoreElements(); )
protected void cleanup() throws StandardException { lcc.popTriggerExecutionContext(this); /* ** Explicitly close all result sets that we have ** given out to the user. */ for (Enumeration enum = resultSetVector.elements(); enum.hasMoreElements(); ) { java.sql.ResultSet rs = (java.sql.ResultSet)enum.nex...
java.sql.ResultSet rs = (java.sql.ResultSet)enum.nextElement();
java.sql.ResultSet rs = (java.sql.ResultSet)e.nextElement();
protected void cleanup() throws StandardException { lcc.popTriggerExecutionContext(this); /* ** Explicitly close all result sets that we have ** given out to the user. */ for (Enumeration enum = resultSetVector.elements(); enum.hasMoreElements(); ) { java.sql.ResultSet rs = (java.sql.ResultSet)enum.nex...
resultSetVector = null; if (afterResultSet != null) { afterResultSet.close(); afterResultSet = null; } if (beforeResultSet != null) { beforeResultSet.close(); beforeResultSet = null; } lcc = null; cleanupCalled = true; }
protected void cleanup() throws StandardException { lcc.popTriggerExecutionContext(this); /* ** Explicitly close all result sets that we have ** given out to the user. */ for (Enumeration enum = resultSetVector.elements(); enum.hasMoreElements(); ) { java.sql.ResultSet rs = (java.sql.ResultSet)enum.nex...
throws ClientInfoException {
throws SQLClientInfoException {
public void setClientInfo(Properties properties) throws ClientInfoException { try { checkForNullPhysicalConnection(); } catch (SQLException se) { throw new ClientInfoException (se.getMessage(), se.getSQLState(), (new FailedProperties40(properties)).getProperties()); } physicalConnection_.setClientIn...
throw new ClientInfoException
throw new SQLClientInfoException
public void setClientInfo(Properties properties) throws ClientInfoException { try { checkForNullPhysicalConnection(); } catch (SQLException se) { throw new ClientInfoException (se.getMessage(), se.getSQLState(), (new FailedProperties40(properties)).getProperties()); } physicalConnection_.setClientIn...
if (row == 0) { throw ijException.zeroInvalidForAbsolute(); }
public ijResult absolute(ResultSet rs, int row) throws SQLException { boolean forwardOnly; try { // absolute is only allowed on scroll cursors forwardOnly = (rs.getStatement().getResultSetType() == JDBC20Translation.TYPE_FORWARD_ONLY); } catch (AbstractMethodError ame) { //because weblo...
checkForSupportedDataType(targetSqlType);
public final void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { if (x == null) { setNull(parameterIndex, targetSqlType); return; } int paramJDBCType = getParameterJDBCType(parameterIndex); if (paramJDBCType != java.sql.Types.JAVA_OBJECT) { if (!Data...
suite.addTest(XMLTypeAndOpsTest.suite()); suite.addTest(XMLMissingClassesTest.suite());
public static Test suite() { TestSuite suite = new TestSuite("lang"); // DERBY-1315 and DERBY-1735 need to be addressed // before re-enabling this test as it's memory use is // different on different vms leading to failures in // the nightly runs. // suite.addTest(largeCodeG...
return jdbcClient.getUrlBase() + dbName;
return jdbcClient.getUrlBase() + name;
private String createJDBCUrlWithDatabaseName(String name) { if (jdbcClient == JDBCClient.EMBEDDED) { return jdbcClient.getUrlBase() + dbName; } else { return jdbcClient.getUrlBase() + hostName + ":" + port + "/" + name; } }
Connection con = null; JDBCClient client =getJDBCClient(); if (HAVE_DRIVER) { loadJDBCDriver(client.getJDBCDriverName()); if (!isSingleLegXA()) { con = DriverManager.getConnection( getJDBCUrl() + ";create=true", getUserName(), getUserPassword()); } else { con = TestDataSourceFactory.getXADataSource().getXAConnection (g...
return getConnection(getDatabaseName());
public Connection getDefaultConnection() throws SQLException { Connection con = null; JDBCClient client =getJDBCClient(); if (HAVE_DRIVER) { loadJDBCDriver(client.getJDBCDriverName()); if (!isSingleLegXA()) { con = DriverManager.getConnect...
Properties attrs = new Properties(); if (!(DERBY_TEST_CONFIG.getJDBCClient() == JDBCClient.EMBEDDED)) { attrs.setProperty("serverName", DERBY_TEST_CONFIG.getHostName()); attrs.setProperty("portNumber", Integer.toString(DERBY_TEST_CONFIG.getPort())); } attrs.setProperty("databaseName", DERBY_TEST_CONFIG.getDatabaseName(...
return getDataSourcePropertiesForDatabase( DERBY_TEST_CONFIG.getDatabaseName());
public static Properties getDefaultDataSourceProperties() { Properties attrs = new Properties(); if (!(DERBY_TEST_CONFIG.getJDBCClient() == JDBCClient.EMBEDDED)) { attrs.setProperty("serverName", DERBY_TEST_CONFIG.getHostName()); attrs.setProperty("portNumber", Integer.toString(D...
String entityName = (schemaName == null ? tableName : schemaName + "." + tableName);
private static void performImport(Connection connection, String schemaName, String insertColumnList, String columnIndexes, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace) throws SQLExcepti...
if (entityName == null)
if (tableName == null)
private static void performImport(Connection connection, String schemaName, String insertColumnList, String columnIndexes, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace) throws SQLExcepti...
String entityName = (schemaName == null ? "\""+ tableName + "\"" : "\"" + schemaName + "\"" + "." + "\"" + tableName + "\"");
private static void performImport(Connection connection, String schemaName, String insertColumnList, String columnIndexes, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace) throws SQLExcepti...
/* If whereClause is a parameter, (where ?), then we should catch it and throw exception
/* If whereClause is a parameter, (where ?/where -?/where +?), then we should catch it and throw exception
public void bindExpressions(FromList fromListParam) throws StandardException { int fromListParamSize = fromListParam.size(); int fromListSize = fromList.size(); int numDistinctAggs; if (SanityManager.DEBUG) SanityManager.ASSERT(fromList != null && resultColumns != null, "Both fromList and resultColumns are ...
{
public void bindExpressions(FromList fromListParam) throws StandardException { int fromListParamSize = fromListParam.size(); int fromListSize = fromList.size(); int numDistinctAggs; if (SanityManager.DEBUG) SanityManager.ASSERT(fromList != null && resultColumns != null, "Both fromList and resultColumns are ...
}
if ((whereClause instanceof UnaryOperatorNode) && ((UnaryOperatorNode)whereClause).isUnaryMinusOrPlusWithParameter()) throw StandardException.newException(SQLState.LANG_NON_BOOLEAN_WHERE_CLAUSE, "PARAMETER" );
public void bindExpressions(FromList fromListParam) throws StandardException { int fromListParamSize = fromListParam.size(); int fromListSize = fromList.size(); int numDistinctAggs; if (SanityManager.DEBUG) SanityManager.ASSERT(fromList != null && resultColumns != null, "Both fromList and resultColumns are ...
t_wrapper();
void startEmbeddedTestMethods( Connection conn_main ) { PreparedStatement ps_main = null; stmtIsClosed = false; try { Statement s = conn_main.createStatement(); s.execute("create table clobtable3 (n int,clobcol CLOB)"); File file = new File("...
rs.updateLong(1,123);
rs.updateLong(2,2);
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.executeUpdate("create trigger tr3 after delete on table1WithTriggers for each statement mode db2sql delete from table1WithTriggers");
stmt.executeUpdate("create trigger tr3 after delete on table1WithTriggers referencing old as old for each row mode db2sql delete from table1WithTriggers where c1=old.c1+1 or c1=old.c1-1");
static void setup(boolean first) throws SQLException { Statement stmt = conn.createStatement(); stmt.executeUpdate("create table t1 (c1 int, c2 char(20))"); stmt.executeUpdate("create view v1 as select * from t1"); stmt.executeUpdate("create table t2 (c21 int, c22 int)"); stmt.executeUpdate("create table t3 (c31 ...
stmt.executeUpdate("create trigger tr4 after update on table2WithTriggers for each statement mode db2sql update table2WithTriggers set c1=1");
stmt.executeUpdate("create trigger tr4 after update of c2 on table2WithTriggers for each statement mode db2sql update table2WithTriggers set c1=1");
static void setup(boolean first) throws SQLException { Statement stmt = conn.createStatement(); stmt.executeUpdate("create table t1 (c1 int, c2 char(20))"); stmt.executeUpdate("create view v1 as select * from t1"); stmt.executeUpdate("create table t2 (c21 int, c22 int)"); stmt.executeUpdate("create table t3 (c31 ...
if (expression.isParameterNode())
if (expression.requiresTypeFromContext())
public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { /* ** Set the type of a parameter to the type of the result column. ** Don't do it if this result column doesn't have a type yet. ** This can happen if the parameter is part of a ...
((ParameterNode) expression).setDescriptor(getTypeServices());
expression.setType(getTypeServices());
public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { /* ** Set the type of a parameter to the type of the result column. ** Don't do it if this result column doesn't have a type yet. ** This can happen if the parameter is part of a ...
if (expression.isParameterNode())
if (expression.requiresTypeFromContext())
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.isParameterNode()) { ret...
public DataTypeDescriptor getExpressionType()
public DataTypeDescriptor getExpressionType() throws StandardException
public DataTypeDescriptor getExpressionType() { return (expression == null) ? dataTypeServices : expression.getTypeServices(); }
public TypeId getTypeId()
public TypeId getTypeId() throws StandardException
public TypeId getTypeId() { TypeId t = super.getTypeId(); if( t == null) { if( expression != null) { DataTypeDescriptor dtd = getTypeServices(); if( dtd != null) t = dtd.getTypeId(); } } return t; } // ...
public DataTypeDescriptor getTypeServices()
public DataTypeDescriptor getTypeServices() throws StandardException
public DataTypeDescriptor getTypeServices() { DataTypeDescriptor dtd = super.getTypeServices(); if( dtd == null && expression != null) { dtd = expression.getTypeServices(); if( dtd != null) setType( dtd); } return dtd; } // end of getTypeServic...
public void init(Object arg1, Object arg2)
public void init(Object arg1, Object arg2) throws StandardException
public void init(Object arg1, Object arg2) { // RESOLVE: This is something of a hack - it is not obvious that // the first argument being null means it should be treated as // a String. if ((arg1 instanceof String) || (arg1 == null)) { this.name = (String) arg1; this.exposedName = this.name; this.expression...
if ((expression != null) && (expression instanceof UnaryOperatorNode) && ((UnaryOperatorNode)expression).isUnaryMinusOrPlusWithParameter()) throw StandardException.newException(SQLState.LANG_PARAM_IN_SELECT_LIST);
void rejectParameter() throws StandardException { if ((expression != null) && (expression.isParameterNode())) throw StandardException.newException(SQLState.LANG_PARAM_IN_SELECT_LIST); }
if (canUseStatementAfterXa_end) { resultSetQuery("Params-local-2", psParams.executeQuery()); }
resultSetQuery("Params-local-2", psParams.executeQuery());
protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d...
positionInHashTable = new SQLInteger(); needsRepositioning = false; if (isForUpdate()) { target = ((CursorActivation)activation).getTargetResultSet(); extraColumns = LAST_EXTRA_COLUMN + 1; } else { target = null; extraColumns = 1; }
public ScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException { super(activation, resultSetNumber, optim...
private void addRowToHashTable(ExecRow sourceRow)
private void addRowToHashTable(ExecRow sourceRow, int position, RowLocation rowLoc, boolean rowUpdated)
private void addRowToHashTable(ExecRow sourceRow) throws StandardException { DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1]; // 1st element is the key hashRowArray[0] = new SQLInteger(positionInSource); /* Copy rest of elements from sourceRow. * NOTE: We need to clone the sourc...
DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1];
DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + extraColumns];
private void addRowToHashTable(ExecRow sourceRow) throws StandardException { DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1]; // 1st element is the key hashRowArray[0] = new SQLInteger(positionInSource); /* Copy rest of elements from sourceRow. * NOTE: We need to clone the sourc...
hashRowArray[0] = new SQLInteger(positionInSource);
hashRowArray[0] = new SQLInteger(position); if (isForUpdate()) { hashRowArray[POS_ROWLOCATION] = rowLoc.getClone(); hashRowArray[POS_ROWDELETED] = new SQLBoolean(false); hashRowArray[POS_ROWUPDATED] = new SQLBoolean(rowUpdated); }
private void addRowToHashTable(ExecRow sourceRow) throws StandardException { DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1]; // 1st element is the key hashRowArray[0] = new SQLInteger(positionInSource); /* Copy rest of elements from sourceRow. * NOTE: We need to clone the sourc...
System.arraycopy(sourceRowArray, 0, hashRowArray, 1, sourceRowArray.length);
System.arraycopy(sourceRowArray, 0, hashRowArray, extraColumns, sourceRowArray.length);
private void addRowToHashTable(ExecRow sourceRow) throws StandardException { DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1]; // 1st element is the key hashRowArray[0] = new SQLInteger(positionInSource); /* Copy rest of elements from sourceRow. * NOTE: We need to clone the sourc...
public ExecRow getCurrentRow()
public ExecRow getCurrentRow() throws StandardException
public ExecRow getCurrentRow() { return currentRow; }
return currentRow;
if (isForUpdate() && isDeleted()) { return null; } else { return currentRow; }
public ExecRow getCurrentRow() { return currentRow; }
addRowToHashTable(sourceRow);
RowLocation rowLoc = null; if (source.isForUpdate()) { rowLoc = ((CursorResultSet)source).getRowLocation(); } addRowToHashTable(sourceRow, currentPosition, rowLoc, false);
private ExecRow getNextRowFromSource() throws StandardException { ExecRow sourceRow = null; ExecRow result = null; /* Don't give back more rows than requested */ if (maxRows > 0 && maxRows == positionInSource) { seenLast = true; lastPosition = positionInSource; afterLast = true; return null; } sourceR...
DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(new SQLInteger(position));
positionInHashTable.setValue(position); DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(positionInHashTable);
private ExecRow getRowFromHashTable(int position) throws StandardException { // Get the row from the hash table DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(new SQLInteger(position)); if (SanityManager.DEBUG) { SanityManager.ASSERT(hashRowArray != null, "hashRowArray expected to be non...
DataValueDescriptor[] resultRowArray = new DataValueDescriptor[hashRowArray.length - 1]; System.arraycopy(hashRowArray, 1, resultRowArray, 0, resultRowArray.length);
DataValueDescriptor[] resultRowArray = new DataValueDescriptor[hashRowArray.length - extraColumns]; System.arraycopy(hashRowArray, extraColumns, resultRowArray, 0, resultRowArray.length);
private ExecRow getRowFromHashTable(int position) throws StandardException { // Get the row from the hash table DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(new SQLInteger(position)); if (SanityManager.DEBUG) { SanityManager.ASSERT(hashRowArray != null, "hashRowArray expected to be non...
currentRow = resultRow;
if (isForUpdate()) { RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION]; ((NoPutResultSet)target).setCurrentRow(resultRow); ((NoPutResultSet)target).positionScanAtRowLocation(rowLoc); needsRepositioning = true; } setCurrentRow(resultRow);
private ExecRow getRowFromHashTable(int position) throws StandardException { // Get the row from the hash table DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(new SQLInteger(position)); if (SanityManager.DEBUG) { SanityManager.ASSERT(hashRowArray != null, "hashRowArray expected to be non...
String grantor)
String grantor) throws StandardException
public ColPermsDescriptor newColPermsDescriptor( TableDescriptor td, String type, FormatableBitSet columns, String grantor) { return new ColPermsDescr...
throws StandardException
public TablePermsDescriptor newTablePermsDescriptor( TableDescriptor td, String selectPerm, String deletePerm, String insertPerm, ...
if (tag == null) { throw new JellyTagException("This tag must be nested inside a <applicationWindow>");
if (tag != null) { return tag.getWindow().getShell();
protected Shell getShell() throws JellyTagException { ApplicationWindowTag tag = (ApplicationWindowTag) findAncestorWithClass(ApplicationWindowTag.class); if (tag == null) { throw new JellyTagException("This tag must be nested inside a <applicationWindow>"); } else { ...
return tag.getWindow().getShell();
Map attributes = getAttributes(); Object parent = attributes.remove("parent"); if (parent instanceof Shell) { return (Shell) parent; } else { throw new JellyTagException("This tag must be nested inside a <applicationWindow> or have a parent of type Shell"); }
protected Shell getShell() throws JellyTagException { ApplicationWindowTag tag = (ApplicationWindowTag) findAncestorWithClass(ApplicationWindowTag.class); if (tag == null) { throw new JellyTagException("This tag must be nested inside a <applicationWindow>"); } else { ...
public void bind( TableDescriptor td) throws StandardException
public void bind( TableDescriptor td, boolean isGrant) throws StandardException
public void bind( TableDescriptor td) throws StandardException { this.td = td; for( int action = 0; action < TablePrivilegeInfo.ACTION_COUNT; action++) { if( columnLists[ action] != null) columnBitSets[action] = columnLists[ action].bindResultColumnsByName( td, (DMLStatementNode) null); // Prevent granting...
if (isGrant && td.getTableType() == TableDescriptor.VIEW_TYPE) { bindPrivilegesForView(td); }
public void bind( TableDescriptor td) throws StandardException { this.td = td; for( int action = 0; action < TablePrivilegeInfo.ACTION_COUNT; action++) { if( columnLists[ action] != null) columnBitSets[action] = columnLists[ action].bindResultColumnsByName( td, (DMLStatementNode) null); // Prevent granting...
return new TablePrivilegeInfo( td, actionAllowed, columnBitSets);
return new TablePrivilegeInfo( td, actionAllowed, columnBitSets, descriptorList);
public PrivilegeInfo makePrivilegeInfo() { return new TablePrivilegeInfo( td, actionAllowed, columnBitSets); }
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"); vCmd = jvm.getCommandLine(); try { Connection conn1 = ij.startJBMS(); System.out.println("Testi...
public static void main(String[] args) throws Exception { test(args); }
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 { Connection conn1 = ij.st...
doClientURLTest(driver);
public static void main(String[] args) { try { Driver driver = loadAndCheckDriverForFramework(); checkAcceptsURL(driver); testEmbeddedAttributes(driver); testClientAttributes(driver); } catch (SQLException se) { while (se != null) { se.printStackTrace(System.out); se = se.getNextException(); ...
private static void testConnect(Driver driver, String url, Properties info) throws SQLException
private static Connection testConnect(Driver driver, String url, Properties info) throws SQLException
private static void testConnect(Driver driver, String url, Properties info) throws SQLException { String infoString = null; if (info != null) infoString = replaceSystemHome(info.toString()); String urlString = replaceSystemHome(url); Connection conn = driver.connect(url,info); System.out.println("\nConnection...
return conn;
private static void testConnect(Driver driver, String url, Properties info) throws SQLException { String infoString = null; if (info != null) infoString = replaceSystemHome(info.toString()); String urlString = replaceSystemHome(url); Connection conn = driver.connect(url,info); System.out.println("\nConnection...
throw StandardException.newException(SQLState.LANG_ZERO_INVALID_FOR_R_S_ABSOLUTE);
setBeforeFirstRow(); return null;
public ExecRow getAbsoluteRow(int row) throws StandardException { if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "absolute"); } attachStatementContext(); if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be...
if (beforeFirst || afterLast) { throw StandardException.newException(SQLState.LANG_NO_CURRENT_ROW_FOR_RELATIVE); }
public ExecRow getRelativeRow(int row) throws StandardException { if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "relative"); } attachStatementContext(); if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be...
}
public ExecRow getRelativeRow(int row) throws StandardException { if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "relative"); } attachStatementContext(); if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be...
if (costEstimate == null) { costEstimate = childResult.getFinalCostEstimate(); }
costEstimate = childResult.getFinalCostEstimate();
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. ...
} if ((testEncoding != null) && (jvmName.equals("jdk15"))) { jvmProps.addElement("derbyTesting.encoding=" + testEncoding); jvmProps.addElement("file.encoding=" + testEncoding); jvmflags = (jvmflags==null?"":jvmflags+" ") + "-Dfile.encoding=" + testEncoding;
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...
if(testEncoding == null) { testEncoding = ap.getProperty("derbyTesting.encoding"); if ((jvmName.equals("jdk15")) && (testEncoding != null)) { jvmflags = (jvmflags==null?"":jvmflags+" ") + "-Dfile.encoding=" + testEncoding; ap.put("file.encoding",testEncoding); } }
private static String createPropString() throws ClassNotFoundException, FileNotFoundException, IOException { // Check for existence of app properties and/or derby.properties files // Copy the derby.properties to the db base directory // Then create the -p string for the test String p...
new ProcessStreamResult(pr.getInputStream(), bos, timeoutStr);
new ProcessStreamResult(pr.getInputStream(), bos, timeoutStr, testEncoding);
private static void execTestProcess(String[] testCmd) throws Exception { // Execute the process and handle the results Process pr = null; try { // We need the process inputstream and errorstream ProcessStreamResult prout = null; ProcessStreamResu...
new ProcessStreamResult(pr.getErrorStream(), bos, timeoutStr);
new ProcessStreamResult(pr.getErrorStream(), bos, timeoutStr, testEncoding);
private static void execTestProcess(String[] testCmd) throws Exception { // Execute the process and handle the results Process pr = null; try { // We need the process inputstream and errorstream ProcessStreamResult prout = null; ProcessStreamResu...
testEncoding = sp.getProperty("derbyTesting.encoding"); if ((testEncoding != null) && (!jvmName.equals("jdk15"))) { skiptest = true; addSkiptestReason("derbyTesting.encoding can only be used with jdk15, skipping test"); }
private static void getProperties(Properties sp) throws Exception { // Get any properties specified on the command line searchCP = sp.getProperty("ij.searchClassPath"); framework = sp.getProperty("framework"); if (framework == null) framework = "embedded"; if (!verifyFramework(framework...
if (config.getJDBCClient().isEmbedded()) {
if (!config.getJDBCClient().isEmbedded()) {
protected void setUp() throws Exception { if (config.getJDBCClient().isEmbedded()) { BaseTestCase.println("Starting network server:"); networkServerController = new NetworkServerControl (InetAddress.getByName(config.getHostName()), config.getPort()); ...
if (usingNoneAuth && getLanguageConnection().usesSqlAuthorization()) addWarning(EmbedSQLWarning.newEmbedSQLWarning(SQLState.SQL_AUTHORIZATION_WITH_NO_AUTHENTICATION));
public EmbedConnection(InternalDriver driver, String url, Properties info) throws SQLException { // Create a root connection. applicationConnection = rootConnection = this; factory = driver; tr = new TransactionResourceImpl(driver, url, info); active = true; // register this thread and its context manager with...
if (authenticationService instanceof NoneAuthenticationServiceImpl) usingNoneAuth = true;
private void checkUserCredentials(String dbname, Properties userInfo) throws SQLException { if (SanityManager.DEBUG) SanityManager.ASSERT(!isClosed(), "connection is closed"); // If a database name was passed-in then check user's credential // in that database using the database's authentication servi...
double optimizerEstimatedCost, GeneratedMethod closeCleanup)
double optimizerEstimatedCost)
public UnionResultSet(NoPutResultSet source1, NoPutResultSet source2, Activation activation, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup) { super(activation, resultSetNumber, optimizerEstimatedR...
this.closeCleanup = closeCleanup;
public UnionResultSet(NoPutResultSet source1, NoPutResultSet source2, Activation activation, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup) { super(activation, resultSetNumber, optimizerEstimatedR...
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 } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to ...
currentRow = null;
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to ...
NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statement);
void parseDescribeError(StatementCallbackInterface statement) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface()); statem...
NetSqlca sqlca = parseAbnormalEndUow(statementI.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statementI);
void parseExecuteError(StatementCallbackInterface statementI) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statementI.getConnectionCallbackInterface()); state...
NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statement);
void parseExecuteImmediateError(StatementCallbackInterface statement) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface()); ...
NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statement);
void parseExecuteSetStatementError(StatementCallbackInterface statement) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface()); ...
NetSqlca sqlca = parseAbnormalEndUow(statementI.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statementI);
void parseOpenQueryError(StatementCallbackInterface statementI) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statementI.getConnectionCallbackInterface()); sta...
NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface());
NetSqlca sqlca = parseAbnormalEndUow(statement);
void parsePrepareError(StatementCallbackInterface statement) throws DisconnectException { int peekCP = peekCodePoint(); switch (peekCP) { case CodePoint.ABNUOWRM: { NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface()); stateme...
NetCursor(NetAgent netAgent, int qryprctyp) { this(netAgent); if (qryprctyp == CodePoint.FIXROWPRC) { blocking_ = false; } else if (qryprctyp == CodePoint.LMTBLKPRC) { blocking_ = true; }
NetCursor(NetAgent netAgent) { super(netAgent); netAgent_ = netAgent; numMddOverrides_ = 0; maximumRowSize_ = 0; extdtaPositions_ = new java.util.HashMap(); extdtaData_ = new java.util.ArrayList();
NetCursor(NetAgent netAgent, int qryprctyp) //protocolType, CodePoint.FIXROWPRC | CodePoint.LMTBLKPRC { this(netAgent); if (qryprctyp == CodePoint.FIXROWPRC) { blocking_ = false; } else if (qryprctyp == CodePoint.LMTBLKPRC) { blocking_ = true; } ...
unsupportedList.add( candidate.getClass().getName() + ": " + method );
StackTraceElement[] stack = cause.getStackTrace(); int i = 0; while(i < stack.length && !stack[i].getMethodName(). equals("notImplemented")){ ++i; } while(i < stack.length && stack[i].getMethodName(). equals("notImplemented")){ ++i; } if (i == stack.length) { } unsupportedList.add( candidate.getClass().getName() + ":...
private void vetMethod ( Object candidate, Class iface, Method method, HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { try { method.invoke( candidate, getNullArguments( method.getParameterTypes() ) ); // it's ok for the method to succeed } catch (Throwable e) { if...
public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId, UUID keyConstraintId, int raDeleteRule, int raUpdateRule)
public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId)
public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId, UUID keyConstraintId, int raDeleteRule, int raUpdateRule) { this(constraintId, indexId); this.keyConstraintId = keyConstraintId; this.raDeleteRule = raDeleteRule; this.raUpdateRule = raUpdateRule; }
this(constraintId, indexId); this.keyConstraintId = keyConstraintId; this.raDeleteRule = raDeleteRule; this.raUpdateRule = raUpdateRule;
super(constraintId); this.indexId = indexId;
public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId, UUID keyConstraintId, int raDeleteRule, int raUpdateRule) { this(constraintId, indexId); this.keyConstraintId = keyConstraintId; this.raDeleteRule = raDeleteRule; this.raUpdateRule = raUpdateRule; }
System.out.println("JDBC 3.0 savepoint " + sqle.toString());
System.out.println("JDBC 3.0 savepoint SQL Exception: (" + sqle.getSQLState() + ") " + sqle.getMessage());
public void checkConnection(String dsName, Connection conn) throws SQLException { System.out.println("Running JDBC 3.0 connection checks on " + dsName); System.out.println(" holdability " + (conn.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); // check it's a 3.0 connection object try { conn.rel...