rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return "routinePerms: grantor=" + getGrantee() +
return "routinePerms: grantee=" + getGrantee() + ",routinePermsUUID=" + getUUID() +
public String toString() { return "routinePerms: grantor=" + getGrantee() + ",grantor=" + getGrantor() + ",routineUUID=" + getRoutineUUID(); }
return changeInstanceTo(createArgs[0], newIdentity).createIdentity(key, createParameter);
return( changeInstanceTo(createArgs[0], newIdentity).createIdentity( key, createParameter));
public Cacheable createIdentity(Object key, Object createParameter) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(key instanceof PageKey); } initialize(); PageKey newIdentity = (PageKey) key; int[] createArgs = (int[]) createParameter; if (createArgs[0] == -1) { throw Stan...
for(int i=0;;){ try {
for (int io_retry_count = 0;;) { try {
private void readPage(FileContainer myContainer, PageKey newIdentity) throws StandardException { int pagesize = myContainer.getPageSize(); setPageArray(pagesize); for(int i=0;;){ try { myContainer.readPage(newIdentity.getPageNumber(), pageData); break; } catch (IOException ioe) { i++; // w...
} catch (IOException ioe) { i++;
} catch (IOException ioe) { io_retry_count++;
private void readPage(FileContainer myContainer, PageKey newIdentity) throws StandardException { int pagesize = myContainer.getPageSize(); setPageArray(pagesize); for(int i=0;;){ try { myContainer.readPage(newIdentity.getPageNumber(), pageData); break; } catch (IOException ioe) { i++; // w...
if(i>4){
if (io_retry_count > 4) {
private void readPage(FileContainer myContainer, PageKey newIdentity) throws StandardException { int pagesize = myContainer.getPageSize(); setPageArray(pagesize); for(int i=0;;){ try { myContainer.readPage(newIdentity.getPageNumber(), pageData); break; } catch (IOException ioe) { i++; // w...
if(dataFactory.getLogFactory().inRFR()) throw se; if (SanityManager.DEBUG)
if (dataFactory.getLogFactory().inRFR())
private void readPage(FileContainer myContainer, PageKey newIdentity) throws StandardException { int pagesize = myContainer.getPageSize(); setPageArray(pagesize); for(int i=0;;){ try { myContainer.readPage(newIdentity.getPageNumber(), pageData); break; } catch (IOException ioe) { i++; // w...
} else { throw se; }
private void readPage(FileContainer myContainer, PageKey newIdentity) throws StandardException { int pagesize = myContainer.getPageSize(); setPageArray(pagesize); for(int i=0;;){ try { myContainer.readPage(newIdentity.getPageNumber(), pageData); break; } catch (IOException ioe) { i++; // w...
readPage(myContainer, newIdentity);
{ readPage(myContainer, newIdentity); }
public Cacheable setIdentity(Object key) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(key instanceof PageKey); } initialize(); PageKey newIdentity = (PageKey) key; FileContainer myContainer = (FileContainer) containerCache.find(newIdentity.getContainerId()); setContainerRowCou...
0d, (GeneratedMethod)null);
0d );
private BulkTableScanResultSet getTableScanResultSet ( long conglomId ) throws StandardException { if (tableScan == null) { tableScan = new BulkTableScanResultSet( conglomId, tc.getStaticCompiledConglomInfo(conglomId), activation, new MyRowAllocator(fullTemplate), // result row allocator ...
protected LogicalPageOperation(BasePage page, LogicalUndo undo, int recordId) { super(page); this.undo = undo; this.recordId = recordId; }
public LogicalPageOperation() { super(); }
protected LogicalPageOperation(BasePage page, LogicalUndo undo, int recordId) { super(page); this.undo = undo; this.recordId = recordId; }
sourceSchemaName = cr.getSourceSchemaName();
public void bindResultColumnToExpression() throws StandardException { /* ** This gets the same DataTypeServices object as ** is used in the expression. It is probably not ** necessary to clone the object here. */ setType(expression.getTypeServices()); if (expression instanceof ColumnReference) { ColumnRe...
public String getSchemaName()
public String getSchemaName() throws StandardException
public String getSchemaName() { if ((columnDescriptor!=null) && (columnDescriptor.getTableDescriptor() != null)) return columnDescriptor.getTableDescriptor().getSchemaName(); else { if (expression != null) // REMIND: could look in reference, if set. return expression.getSchemaName(); else return ...
boolean updatableByCursor()
public boolean updatableByCursor()
boolean updatableByCursor() { return updatableByCursor; }
columnInfo[ix].autoincInc, columnInfo[ix].autoincInc != 0
columnInfo[ix].autoincInc
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...
columnDescriptor.getAutoincInc(), columnDescriptor.getAutoincInc() != 0);
columnDescriptor.getAutoincInc());
private void modifyColumnConstraint(Activation activation, String colName, boolean nullability) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransaction...
columnInfo[ix].autoincInc != 0,
private void modifyColumnDefault(Activation activation, int ix) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyManager(); TransactionController tc = lcc.getTr...
columnInfo[ix].autoincInc, columnInfo[ix].autoincInc != 0
columnInfo[ix].autoincInc
private void modifyColumnType(Activation activation, int ix) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransactionExecute(); ColumnDescriptor columnDescriptor...
static void dropTriggerDescriptor
public static void dropTriggerDescriptor
static void dropTriggerDescriptor ( LanguageConnectionContext lcc, DependencyManager dm, DataDictionary dd, TransactionController tc, TriggerDescriptor triggerd, Activation activation ) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(triggerd!=null, "trigger descriptor...
suite.addTest(TestDbMetaData.suite());
public static Test suite() throws SQLException { TestSuite suite = new TestSuite(); // These really need to run standalone. //suite.addTestSuite(AutoloadBooting.class); //suite.addTestSuite(AutoloadTest.class); suite.addTest(BlobTest.suite()); suite.addTest(CallableStatementTest.suite()); suite.ad...
return new CallableStatementTestSetup(suite);
mainSuite.addTest(new CallableStatementTestSetup(suite)); mainSuite.addTest(SetObjectUnsupportedTest.suite(true)); return mainSuite;
public static Test suite() { TestSuite suite = new TestSuite(CallableStatementTest.class, "CallableStatementTest suite"); return new CallableStatementTestSetup(suite); }
return (new TestSuite(ParameterMetaDataWrapperTest.class, "ParameterMetaDataWrapperTest suite"));
return TestConfiguration.defaultSuite( ParameterMetaDataWrapperTest.class);
public static Test suite() { return (new TestSuite(ParameterMetaDataWrapperTest.class, "ParameterMetaDataWrapperTest suite")); }
new MessageId(SQLState.ALREADY_CLOSED), "ResultSet");
new MessageId(SQLState.CLIENT_RESULT_SET_NOT_OPEN));
protected final void checkForClosedResultSet() throws SqlException { if (!openOnClient_) { agent_.checkForDeferredExceptions(); throw new SqlException(agent_.logWriter_, new MessageId(SQLState.ALREADY_CLOSED), "ResultSet"); } else { agent...
String s = "select "+colNames[i]+" from "+table;
String s = "select "+ colNames[i] + " as " + colNames[i] + "_1, " + colNames[i] + " as " + colNames[i] + "_2, " + colNames[i] + " as " + colNames[i] + "_3, " + colNames[i] + " as " + colNames[i] + "_4, " + colNames[i] + " as " + colNames[i] + "_5, " + colNames[i] + " as " + colNames[i] + "_6, " + colNames[i] + " as " +...
public void testGetters() throws SQLException { for(int i=0; i<columns; i++) { System.out.println("\n\n=== Columntype "+colTypes[i]); String s = "select "+colNames[i]+" from "+table; ResultSet rs = X(s); rs.next(); // goto first int getno = 0; ...
while(null!=(r = getter(rs, getno, 1))) {
while(null!=(r = getter(rs, getno, getno + 1 ))) {
public void testGetters() throws SQLException { for(int i=0; i<columns; i++) { System.out.println("\n\n=== Columntype "+colTypes[i]); String s = "select "+colNames[i]+" from "+table; ResultSet rs = X(s); rs.next(); // goto first int getno = 0; ...
TestSuite suite = new TestSuite("ResultSetCloseTest");
public static Test suite() { TestSuite suite = new TestSuite("ResultSetCloseTest"); // DB2 client doesn't implement result set closing // correctly wrt ensuring all its methods subsequently // throw an exception. if (usingDerbyNet()) return suite; ...
return suite;
return new TestSuite("empty");
public static Test suite() { TestSuite suite = new TestSuite("ResultSetCloseTest"); // DB2 client doesn't implement result set closing // correctly wrt ensuring all its methods subsequently // throw an exception. if (usingDerbyNet()) return suite; ...
suite.addTestSuite(ResultSetCloseTest.class); return suite;
return TestConfiguration.defaultSuite(ResultSetCloseTest.class);
public static Test suite() { TestSuite suite = new TestSuite("ResultSetCloseTest"); // DB2 client doesn't implement result set closing // correctly wrt ensuring all its methods subsequently // throw an exception. if (usingDerbyNet()) return suite; ...
stmt.close();
stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT); rs = stmt.executeQuery("select * from t"); rs.next(); checkForCloseOnException(rs, false); rs.close(); stmt.close();
public static void main(String[] args) { Connection con; ResultSet rs; Statement stmt; String[] columnNames = {"i", "s", "r", "d", "dt", "t", "ts", "c", "v", "tn", "dc"}; System.out.println("Test resultsetJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial conne...
public void init (String encStr, String locStr, String msgF){ if (encStr != null){ encode = encStr; } if (encode == null) { String eEncode = getEnvProperty(ENV_CODESET); if ( eEncode != null ){ encode = eEncode; } } if (encode == null ){ encode = new java.io.InputStreamReader(System.in).getEncoding(); } locale = get...
public void init(){ init(null,null,null);
public void init (String encStr, String locStr, String msgF){ if (encStr != null){ encode = encStr; } //then get encoding string from environment if (encode == null) { String eEncode = getEnvProperty(ENV_CODESET); if ( eEncode != null ){ encode = eEncode; } } //last chance: get default encoding if (e...
Connection conn = database.getConnection(); if (conn instanceof BrokeredConnection) ps = conn.prepareStatement(sqlStmt, scrollType, concurType); else ps = prepareStatementJDBC3(sqlStmt, scrollType, concurType,
ps = prepareStatementJDBC3(sqlStmt, scrollType, concurType,
protected PreparedStatement prepare(String sqlStmt) throws SQLException { // save current prepare iso level int saveIsolationLevel = -1; boolean isolationSet = false; if (pkgnamcsn !=null && isolationLevel != Connection.TRANSACTION_NONE) { saveIsolationLevel = database.getPrepareIsolation(); database.set...
PreparedStatement lps = null; int resultSetHoldability = (withHoldCursor == -1) ? resultSetHoldability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT : withHoldCursor; Class[] PREP_STMT_PARAM = { String.class, Integer.TYPE, Integer.TYPE, Integer.TYPE }; Object[] PREP_STMT_ARG = { sqlStmt, new Integer(scrollType), new...
EngineConnection conn = database.getConnection(); if (withHoldCursor == -1) { return conn.prepareStatement(sqlStmt, scrollType, concurType); } return conn.prepareStatement(sqlStmt, scrollType, concurType, withHoldCursor);
private PreparedStatement prepareStatementJDBC3(String sqlStmt, int scrollType, int concurType, int withHoldCursor) throws SQLException { PreparedStatement lps = null; // If holdability is still uninitialized, default is HOLD_CURSORS_OVER_COMMIT int resultSetHoldability = (withHoldCursor == ...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private void exchangeServerAttributes() throws DRDAProtocolException { int codePoint; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + correlationID); } } codePoint = reader.r...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private void parseCNTQRYobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { // optional case CodePoint.OUTOVR: ...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check f...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private void parseEXCSQLSETobjects() throws DRDAProtocolException, SQLException { boolean gotSqlStt = false; boolean hadUnrecognizedStmt = false; String sqlStmt = null; int codePoint; DRDAStatement drdaStmt = database.getDefaultStatement(); drdaStmt.initialize(); do { correlationID = reader.readDssHeader();...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( true );
private boolean parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, gotEXTDTA = false; boolean result = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private String parseEXECSQLIMMobjects() throws DRDAProtocolException, SQLException { String sqlStmt = null; int codePoint; DRDAStatement stmt = database.getDefaultStatement(); do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switc...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private void parseOPNQRYobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { // optional case CodePoint.TYPDEFNAM: ...
codePoint = reader.readLengthAndCodePoint();
codePoint = reader.readLengthAndCodePoint( false );
private String parsePRPSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { String sqlStmt = null; int codePoint; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { // required ...
int codePoint = reader.readLengthAndCodePoint();
int codePoint = reader.readLengthAndCodePoint( false );
private String parseSQLSTTDss() throws DRDAProtocolException { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); String strVal = parseEncodedString(); if (SanityManager.DEBUG) trace("SQL Statement = " + strVal); return strVal; }
int codePoint = reader.readLengthAndCodePoint();
int codePoint = reader.readLengthAndCodePoint( false );
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
int codePoint = reader.readLengthAndCodePoint();
int codePoint = reader.readLengthAndCodePoint( true );
private void readAndSetAllExtParams(final DRDAStatement stmt, final boolean streamLOB) throws SQLException, DRDAProtocolException { final int numExt = stmt.getExtPositionCount(); for (int i = 0; i < numExt; i++) { int paramPos = stmt.getExtPosition(i); final boolean doStreamLOB = (streamLOB && i == n...
if (stream==null) { ps.setBytes(i+1, null); } else { ps.setBinaryStream(i+1, stream, (int) stream.getLength()); }
if( stream instanceof StandardEXTDTAReaderInputStream ){ final StandardEXTDTAReaderInputStream stdeis = (StandardEXTDTAReaderInputStream) stream ; ps.setBinaryStream( i + 1, stdeis, (int) stdeis.getLength() ); } else if( stream instanceof LayerBStreamedEXTDTAReaderInputStream ) { ( ( EnginePreparedStatement ) ps).s...
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 ...
paramBytes = reader.getExtData(checkNullability);
final EXTDTAReaderInputStream stream = reader.getEXTDTAReaderInputStream(checkNullability);
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 ( paramBytes==null ) { ps.setBytes(i+1,
if ( stream == null ) { ps.setBytes(i+1,
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 ...
new ByteArrayInputStream(paramBytes), paramBytes.length);
bais, bais.available() );
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 (SanityManager.DEBUG) { if (paramBytes==null) { trace("parameter value : NULL"); } else { trace("parameter value is a LOB with length:" + paramBytes.length); } }
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 ...
paramBytes = reader.getExtData(checkNullability); paramString = new String(paramBytes, stmt.ccsidSBCEncoding); if (SanityManager.DEBUG) trace("parameter value is: "+ paramString); ps.setString(i+1,paramString);
setAsCharacterStream(ps, i, checkNullability, reader, streamLOB, stmt.ccsidSBCEncoding );
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 ...
paramBytes = reader.getExtData(checkNullability); paramString = new String(paramBytes, stmt.ccsidDBCEncoding ); if (SanityManager.DEBUG) trace("parameter value is: "+ paramString); ps.setString(i+1,paramString);
setAsCharacterStream(ps, i, checkNullability, reader, streamLOB, stmt.ccsidDBCEncoding);
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 ...
paramBytes = reader.getExtData(checkNullability); paramString = new String(paramBytes, stmt.ccsidMBCEncoding); if (SanityManager.DEBUG) trace("parameter value is: "+ paramString); ps.setString(i+1,paramString);
setAsCharacterStream(ps, i, checkNullability, reader, streamLOB, stmt.ccsidMBCEncoding);
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 ...
}
} catch( IOException e ){ throw new SQLException ( e.getMessage() ); }
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 ((xaState_ == XA_LOCAL) ) {
if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) {
public void readCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_LOCAL) ) { readLocalXACommit_(); } } else { readLocalCommit_(); } }
if ((xaState_ == XA_LOCAL) ) {
if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) {
public void writeCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_LOCAL) ) { writeLocalXACommit_(); } } else { writeLocalCommit_(); } }
compilerContext.pushCurrentPrivType(Authorizer.TRIGGER_PRIV); compilerContext.addRequiredTablePriv(triggerTableDescriptor); compilerContext.popCurrentPrivType();
if (isPrivilegeCollectionRequired()) { compilerContext.pushCurrentPrivType(Authorizer.TRIGGER_PRIV); compilerContext.addRequiredTablePriv(triggerTableDescriptor); compilerContext.popCurrentPrivType(); }
public QueryTreeNode bind() throws StandardException { CompilerContext compilerContext = getCompilerContext(); DataDictionary dd = getDataDictionary(); /* ** Grab the current schema. We will use that for ** sps compilation */ LanguageConnectionContext lcc = getLanguageConnectionContext(); compSchemaDescriptor...
public DataTypeDescriptor getTypeServices()
public DataTypeDescriptor getTypeServices() throws StandardException
public DataTypeDescriptor getTypeServices() { DataTypeDescriptor dtd = super.getTypeServices(); if( dtd == null && source != null) { dtd = source.getTypeServices(); if( dtd != null) setType( dtd); } return dtd; } // end of getTypeServices
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws SQLException{ throw Util.notImplemented();
public boolean isWrapperFor(Class<?> interfaces) throws SQLException { return interfaces.isInstance(this);
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws SQLException{ throw Util.notImplemented(); }
public java.lang.Object unwrap(java.lang.Class<?> interfaces) throws SQLException{ throw Util.notImplemented();
public <T> T unwrap(java.lang.Class<T> interfaces) throws SQLException{ try { return interfaces.cast(this); } catch (ClassCastException cce) { throw Util.generateCsSQLException(SQLState.UNABLE_TO_UNWRAP, interfaces); }
public java.lang.Object unwrap(java.lang.Class<?> interfaces) throws SQLException{ throw Util.notImplemented(); }
/* try { if (cloudscapeDriver != null) cloudscapeDriver.connect("jdbc:derby:;shutdown=true", (Properties) null); } catch (SQLException sqle) { if (((EmbedSQLException)sqle).getMessageId() != SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN) consolePropertyMessage("DRDA_ShutdownWarning.I", sqle.getMessage());
if (shutdownDatabasesOnShutdown) { try { if (cloudscapeDriver != null) cloudscapeDriver.connect("jdbc:derby:;shutdown=true", (Properties) null); } catch (SQLException sqle) { if (((EmbedSQLException)sqle).getMessageId() != SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN) consolePropertyMessage("DRDA_ShutdownWarning.I", sqle.g...
public void blockingStart(PrintWriter consoleWriter) throws Exception { startNetworkServer(); setLogWriter(consoleWriter); cloudscapeLogWriter = Monitor.getStream().getPrintWriter(); if (SanityManager.DEBUG && debugOutput) { memCheck.showmem(); mc = new memCheck(200000); mc.start(); } // Open a ser...
*/
public void blockingStart(PrintWriter consoleWriter) throws Exception { startNetworkServer(); setLogWriter(consoleWriter); cloudscapeLogWriter = Monitor.getStream().getPrintWriter(); if (SanityManager.DEBUG && debugOutput) { memCheck.showmem(); mc = new memCheck(200000); mc.start(); } // Open a ser...
shutdownDatabasesOnShutdown = true;
public void executeWork(String args[]) throws Exception { // For convenience just use NetworkServerControlImpls log writer for user messages logWriter = makePrintWriter(System.out); int command = 0; if (args.length > 0) command = findCommand(args); else { consolePropertyMessage("DRDA_NoArgs.U"); } // if...
for (java.util.Iterator i = RollbackOnlyListeners_.iterator(); i.hasNext();) { UnitOfWorkListener listener = (UnitOfWorkListener) i.next(); listener.completeLocalRollback(i); }
public void completeLocalRollback() { for (java.util.Iterator i = CommitAndRollbackListeners_.iterator(); i.hasNext();) { UnitOfWorkListener listener = (UnitOfWorkListener) i.next(); listener.completeLocalRollback(i); } for (java.util.Iterator i = RollbackOnlyListeners_.it...
RollbackOnlyListeners_.clear();
public void markClosed() // called by LogicalConnection.close() { open_ = false; inUnitOfWork_ = false; markStatementsClosed(); CommitAndRollbackListeners_.clear(); RollbackOnlyListeners_.clear(); markClosed_(); }
createTestDatabase(); runCSLook(testDBName);
System.out.println("\n-= Start dblook Functional Tests. =-"); createTestDatabase(dbCreationScript_1); runDBLook(testDBName); System.out.println("\n-= Start dblook Message Tests =-"); createTestDatabase(dbCreationScript_2); runMessageCheckTest(testDBName);
protected void doTest() { try { createTestDatabase(); runCSLook(testDBName); } catch (SQLException se) { System.out.println("FAILED: to complete the test:"); se.printStackTrace(); for (se = se.getNextException(); se != null; se = se.getNextException()) { se.printStackTrace(); } } catch (Except...
se.printStackTrace();
se.printStackTrace(System.out);
protected void doTest() { try { createTestDatabase(); runCSLook(testDBName); } catch (SQLException se) { System.out.println("FAILED: to complete the test:"); se.printStackTrace(); for (se = se.getNextException(); se != null; se = se.getNextException()) { se.printStackTrace(); } } catch (Except...
e.printStackTrace();
e.printStackTrace(System.out);
protected void doTest() { try { createTestDatabase(); runCSLook(testDBName); } catch (SQLException se) { System.out.println("FAILED: to complete the test:"); se.printStackTrace(); for (se = se.getNextException(); se != null; se = se.getNextException()) { se.printStackTrace(); } } catch (Except...
protected void createTestDatabase()
protected void createTestDatabase(String scriptName)
protected void createTestDatabase() throws Exception { Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); jdbcProtocol = "jdbc:derby:"; createDBFromDDL(testDBName, testDBCreationScript); // Figure out where our database directory is (abs path). dbPath = (new File(testDirectory)).getAbsolutePath...
createDBFromDDL(testDBName, testDBCreationScript);
createDBFromDDL(testDBName, scriptName);
protected void createTestDatabase() throws Exception { Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); jdbcProtocol = "jdbc:derby:"; createDBFromDDL(testDBName, testDBCreationScript); // Figure out where our database directory is (abs path). dbPath = (new File(testDirectory)).getAbsolutePath...
System.out.println(e.getMessage());
e.printStackTrace(System.out);
protected void runTest(int whichTest, String dbName, String newDBName) { try { switch(whichTest) { case 2: lookTwo(dbName); break; case 3: lookThree(dbName); break; case 4: lookFour(dbName); break; case 5: lookFive(dbName); break; case 6: lookSix(dbName); break; case 7: lookSeven(dbName); b...
System.out.println("\n-= Start Test. =-");
public static void main (String[] args) { System.out.println("\n-= Start Test. =-"); separator = System.getProperty("file.separator"); new dblook_test().doTest(); System.out.println("\n[ Done. ]\n"); }
return privCopyDirectory(from, to, (byte[])null, (String[])null);
return privCopyDirectory(from, to, (byte[])null, (String[])null, true);
protected boolean privCopyDirectory(StorageFile from, File to) { return privCopyDirectory(from, to, (byte[])null, (String[])null); }
actionFilter));
actionFilter, actionCopySubDirs));
public final Object run() throws IOException { switch(actionCode) { case FILE_WRITER_ACTION: // SECURITY PERMISSION - MP1 return new OutputStreamWriter( actionStorageFile.getOutputStream( actionAppend)); case REGULAR_FILE_EXISTS_ACTION: return ReuseFac...
case STORAGE_FILE_LIST_DIRECTORY_ACTION: return (String[])(actionStorageFile.list()); case COPY_STORAGE_FILE_TO_REGULAR_ACTION: return ReuseFactory.getBoolean(FileUtil.copyFile( (WritableStorageFactory) storageFactory, actionStorageFile, actionRegularFile));
public final Object run() throws IOException { switch(actionCode) { case FILE_WRITER_ACTION: // SECURITY PERMISSION - MP1 return new OutputStreamWriter( actionStorageFile.getOutputStream( actionAppend)); case REGULAR_FILE_EXISTS_ACTION: return ReuseFac...
ps = conn.prepareStatement("create table t2(ti smallint, si smallint,i int, bi bigint, r real, f float, d double precision, n5_2 numeric(5,2), dec10_3 decimal(10,3), ch20 char(20),vc varchar(20), lvc long varchar,b20 char(23) for bit data, vb varchar(23) for bit data, lvb long varchar for bit data, dt date, tm time, t...
ps = conn.prepareStatement("create table t2(" + "ti smallint," + "si smallint," + "i int," + "bi bigint," + "r real," + "f float," + "d double precision," + "n5_2 numeric(5,2)," + "dec10_3 decimal(10,3)," + "ch20 char(20)," + "vc varchar(20), " + "lvc long varchar," + "b20 char(23) for bit data, " + "vb varchar(23) for...
public static void main (String args[]) { try { System.out.println("csPrepStmt Test Starts"); // Initialize JavaCommonClient Driver. // Initialize JavaCommonClient Driver. ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } St...
ps.setNull(13, java.sql.Types.LONGVARCHAR);
ps.setNull(13, java.sql.Types.LONGVARBINARY);
public static void main (String args[]) { try { System.out.println("csPrepStmt Test Starts"); // Initialize JavaCommonClient Driver. // Initialize JavaCommonClient Driver. ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } St...
ps.setNull(16, java.sql.Types.LONGVARBINARY); ps.setNull(17, java.sql.Types.DATE); ps.setNull(18, java.sql.Types.TIME);
ps.setNull(16, java.sql.Types.TIMESTAMP); ps.setNull(17, java.sql.Types.TIMESTAMP); ps.setNull(18, java.sql.Types.DATE);
public static void main (String args[]) { try { System.out.println("csPrepStmt Test Starts"); // Initialize JavaCommonClient Driver. // Initialize JavaCommonClient Driver. ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } St...
storeConstraintDependenciesOnPrivileges(activation, conDesc, referencedConstraint.getTableId());
public void executeConstantAction( Activation activation ) throws StandardException { boolean forCreateTable; ConglomerateDescriptor conglomDesc = null; ConglomerateDescriptor[] conglomDescs = null; ConstraintDescriptor conDesc = null; TableDescriptor td = null; UUID indexId = null; String ...
this.queryExpr = queryExpr; this.opName = opName; this.recompileQuery = false;
public void compileXQExpr(String queryExpr, String opName) throws StandardException { try { /* The following XPath constructor compiles the expression * as part of the construction process. We have to pass * in a PrefixResolver object in order to avoid NPEs when ...
if (recompileQuery) { compileXQExpr(queryExpr, opName); }
protected ArrayList evalXQExpression(XMLDataValue xmlContext, boolean returnResults, int [] resultXType) throws Exception { // Make sure we have a compiled query. if (SanityManager.DEBUG) { SanityManager.ASSERT( (query != null) && (query.getExpression() != null), ...
public void updateNCharacterStream(int columnIndex, Reader x, int length)
public void updateNCharacterStream(int columnIndex, Reader x, long length)
public void updateNCharacterStream(int columnIndex, Reader x, int length) throws SQLException { throw SQLExceptionFactory.notImplemented( "updateNCharacterStream(int,Reader,int)"); }
"updateNCharacterStream(int,Reader,int)");
"updateNCharacterStream(int,Reader,long)");
public void updateNCharacterStream(int columnIndex, Reader x, int length) throws SQLException { throw SQLExceptionFactory.notImplemented( "updateNCharacterStream(int,Reader,int)"); }
public MenuTag(int style) { super(Menu.class, style);
public MenuTag() { super(Menu.class);
public MenuTag(int style) { super(Menu.class, style); }
classname = checkForJDBC40Implementation(classname);
public static javax.sql.XADataSource getXADataSource(Properties attrs) { String classname = getDataSourcePrefix() + XA_DATASOURCE_STRING + "DataSource"; return (javax.sql.XADataSource) getDataSourceWithReflection(classname, attrs); }
privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees);
privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, true);
public QueryTreeNode bind() throws StandardException { privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees); return this; } // end of bind
public QueryTreeNode bind( HashMap dependencies, List grantees ) throws StandardException
public QueryTreeNode bind( HashMap dependencies, List grantees, boolean isGrant ) throws StandardException
public QueryTreeNode bind( HashMap dependencies, List grantees ) throws StandardException { Provider dependencyProvider = null; SchemaDescriptor sd = null; switch( objectType) { case TABLE_PRIVILEGES: TableName tableName = (TableName) objectOfPrivilege; sd = g...
specificPrivileges.bind( td);
specificPrivileges.bind( td, isGrant);
public QueryTreeNode bind( HashMap dependencies, List grantees ) throws StandardException { Provider dependencyProvider = null; SchemaDescriptor sd = null; switch( objectType) { case TABLE_PRIVILEGES: TableName tableName = (TableName) objectOfPrivilege; sd = g...
suite.addTest(TestConfiguration.clientServerDecorator( new StatementTestSetup(new TestSuite(StatementTest.class))));
public static Test suite() { TestSuite suite = new TestSuite("StatementTest suite"); // Decorate test suite with a TestSetup class. suite.addTest(new StatementTestSetup( new TestSuite(StatementTest.class))); return suite; }
stmt = null;
protected void tearDown() throws Exception { // Close default statement if (stmt != null) { stmt.close(); } super.tearDown(); }
if (costEstimate == null) { costEstimate = childResult.getFinalCostEstimate(); }
costEstimate = childResult.getFinalCostEstimate();
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { /* Get the next ResultSet#, so we can number this ResultSetNode, its * ResultColumnList and ResultSet. */ assignResultSetNumber(); // Get the cost estimate from the child if we don't have one yet if (cost...
if (leftOperand.isParameterNode())
if (leftOperand.requiresTypeFromContext())
public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperandList.bindExpression(fromList, subqueryList, aggregateVector); /* Is there a ? paramete...
((ParameterNode) leftOperand).setDescriptor(rightOperandList.getTypeServices());
leftOperand.setType(rightOperandList.getTypeServices());
public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperandList.bindExpression(fromList, subqueryList, aggregateVector); /* Is there a ? paramete...
Connection dmc2 = ij.startJBMS(); cleanUp(dmc2);
public static void main(String[] args) throws Exception { ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); showHoldStatus("initial ", dmc); XATestUtil.createXATransactionView(dmc); dmc.close(); XADataSource dsx = TestUtil.getXADataSource(cleanProper...
int type, int concurrency, int holdability) throws SqlException { super(agent, connection, sql, type, concurrency, holdability);
int type, int concurrency, int holdability, ClientPooledConnection cpc) throws SqlException { super(agent, connection, sql, type, concurrency, holdability,cpc);
public CallableStatement40(Agent agent, Connection connection, String sql, int type, int concurrency, int holdability) throws SqlException { super(agent, connection, sql, type, concurrency, holdability); }
public static String lookupMessage(String key, String[] vals) { String msg = ""; if (vals == null) msg = langUtil.getTextMessage(key); else { switch (vals.length) { case 1: msg = langUtil.getTextMessage( key, vals[0]); break; case 2: msg = langUtil.getTextMessage( key, vals[0], vals[1]); break; default: break; } }
public static String lookupMessage(String key) {
public static String lookupMessage(String key, String[] vals) { String msg = ""; if (vals == null) msg = langUtil.getTextMessage(key); else { switch (vals.length) { case 1: msg = langUtil.getTextMessage( key, vals[0]); break; case 2: msg = langUtil.getTextMessage( key, vals[0], vals[1]);...
return msg;
return lookupMessage(key, null);
public static String lookupMessage(String key, String[] vals) { String msg = ""; if (vals == null) msg = langUtil.getTextMessage(key); else { switch (vals.length) { case 1: msg = langUtil.getTextMessage( key, vals[0]); break; case 2: msg = langUtil.getTextMessage( key, vals[0], vals[1]);...
ps.setDate(3, new Date(1971, 1, 10));
ps.setDate(3, new Date(870505200000L));
private static void test2(Connection conn) { PreparedStatement ps; try { System.out.println("Prepared Statement test begin"); ps = conn.prepareStatement("create table tab2(a int, b float, c date, d varchar(100))"); ps.execute(); ps.close(); //we test execute() and executeQuery() here ps = co...
ps.setDate(3, new Date(1975, 11, 15)); System.out.println("Prepared Statement Test failed"); } catch(SQLException e) { } try { ps.setDate(3, new Date(1975, 11, 15), new GregorianCalendar());
ps.setDate(3, new Date(870505200000L)); System.out.println("Prepared Statement Test failed"); } catch(SQLException e) { } try { ps.setDate(3, new Date(870505200000L), new GregorianCalendar());
private static void test2(Connection conn) { PreparedStatement ps; try { System.out.println("Prepared Statement test begin"); ps = conn.prepareStatement("create table tab2(a int, b float, c date, d varchar(100))"); ps.execute(); ps.close(); //we test execute() and executeQuery() here ps = co...
"EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.outparams.takesString'" +
"EXTERNAL NAME '" + CLASS_NAME + "takesString'" +
private static void test3(Connection conn) { CallableStatement cs; try { System.out.println("Callable Statement test begin"); try { Statement s = conn.createStatement(); s.execute("CREATE PROCEDURE takesString(OUT P1 VARCHAR(40), IN P2 INT) " + "EXTERNAL NAME 'org.apache.derbyTesting.functio...
if(grant) routinePermsDesc.setUUID(null);
public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { // Check that the current user has permission to grant the privileges. LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary...
clientMessageIds.add(SQLState.JDBC_METHOD_NOT_SUPPORTED_BY_SERVER);
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...
testBigDecimalSetObject(conn); testBigDecimalSetObjectWithScale(conn);
public static void main (String args[]) { try { System.out.println("prepStmt Test Starts"); ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } PreparedStatement ps; ResultSet rs; boolean hasResultSet; int uc; // executeUp...