rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
file = new File(filePath + sep + "short.txt"); | file = new File(filePath + sep + "short.utf"); | public static void main(String[] args) { Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Test resultsetStream starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); st... |
PercentPass = (int)Math.round(100* ((double)NumPass/(double)NumRun)); PercentFail = (int)Math.round(100* ((double)NumFail/(double)NumRun)); | PercentPass = (int)Math.ceil(100* ((double)NumPass/(double)NumRun)); PercentFail = (int)Math.floor(100* ((double)NumFail/(double)NumRun)); | static void CalculatePassFailStats() { // total tests run // #, % failures // #, % passed NumPass = CountLines (passFileName); NumFail = CountLines (failFileName); NumRun = NumPass+NumFail; NumSkip = CountLines (skipFileName); PercentPass = (int)Math.round(100* ((double)NumPass/(double)NumRun)); PercentFail =... |
if (leftOperand != null && leftOperand.isParameterNode()) | if (leftOperand != null && leftOperand.requiresTypeFromContext()) | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { ResultColumnList resultColumns; //check if subquery is allowed in expression tree checkReliability( CompilerContext.SUBQUERY_ILLEGAL, SQLState.LANG_SUBQUERY ); resultColumns = res... |
((ParameterNode) leftOperand).setDescriptor( | leftOperand.setType( | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { ResultColumnList resultColumns; //check if subquery is allowed in expression tree checkReliability( CompilerContext.SUBQUERY_ILLEGAL, SQLState.LANG_SUBQUERY ); resultColumns = res... |
private boolean canAllBeFlattened () | private boolean canAllBeFlattened () throws StandardException | private boolean canAllBeFlattened () { boolean result = false; if (isNOT_IN() || isALL()) { ValueNode rightOperand = ((ResultColumn) resultSet.getResultColumns().elementAt(0)). getExpression(); result = (! leftOperand.getTypeServices().isNullable() && ! rightOperand.getTypeServices().isNullable());... |
(leftOperand.isParameterNode())); | (leftOperand.requiresTypeFromContext())); | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { /* Only preprocess this node once. We may get called multiple times * due to tree transformations. */ if (preprocessed) { r... |
super(agent); | super(agent, false); | public Blob(byte[] binaryString, Agent agent, int dataOffset) { super(agent); binaryString_ = binaryString; dataType_ |= BINARY_STRING; sqlLength_ = binaryString.length - dataOffset; lengthObtained_ = true; dataOffset_ = dataOffset; } |
if( willBeLayerBStreamed() ) throw new SqlException(agent_.logWriter_, LOB_OBJECT_LENGTH_UNKNOWN_YET); | public long length() throws SQLException { //call checkValidity to exit by throwing a SQLException if //the Blob object has been freed by calling free() on it checkValidity(); try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { ... | |
return this.cost - ((CostEstimateImpl) other).cost; | if ((this.cost != Double.POSITIVE_INFINITY) || (other.getEstimatedCost() != Double.POSITIVE_INFINITY)) { return this.cost - ((CostEstimateImpl) other).cost; } if ((this.rowCount != Double.POSITIVE_INFINITY) || (other.rowCount() != Double.POSITIVE_INFINITY)) { return this.rowCount - other.rowCount(); } if ((this.sin... | public double compare(CostEstimate other) { if (SanityManager.DEBUG) { if (other == null) { SanityManager.THROWASSERT("Comparing with null CostEstimate"); } if ( ! (other instanceof CostEstimateImpl)) { SanityManager.THROWASSERT(other.getClass().getName()); } } return this.cost - ((CostEstimateImpl) o... |
ContextManager cm = ContextService.getFactory().getCurrentContextManager(); Transaction tran = factory.getRawStoreFactory().findUserTransaction( cm, AccessFactoryGlobals.USER_TRANS_NAME); ((RawTransaction)tran).setBackupBlockingState(true); | public long add(String name, InputStream source) throws StandardException { OutputStream os = null; if (factory.isReadOnly()) { throw StandardException.newException(SQLState.FILE_READ_ONLY); } long generationId = factory.getNextId(); try { StorageFile file = getAsFile(name, generationId); ... | |
((RawTransaction)tran).setBackupBlockingState(true); | public void remove(String name, long currentGenerationId, boolean purgeOnCommit) throws StandardException { if (factory.isReadOnly()) throw StandardException.newException(SQLState.FILE_READ_ONLY); ContextManager cm = ContextService.getFactory().getCurrentContextManager(); Transaction tran = factor... | |
return false; | return true; | public boolean serviceImmediately() { return false; } |
userSuppliedOptimizerOverrides, | public RealHashLeftOuterJoinStatistics( int numOpens, int rowsSeen, int rowsFiltered, long constructorTime, long openTime, long nextTime, long closeTime, int resultSetNumber, int rowsSeenLeft, int rowsSeenRight, int rowsReturned, lo... | |
NetSqlca netSqlca = new NetSqlca(netAgent_.netConnection_, sqlcode, sqlstate, sqlerrproc, typdef.getCcsidSbc()); | NetSqlca netSqlca = new NetSqlca(netAgent_.netConnection_, sqlcode, sqlstate, sqlerrproc); | private NetSqlca parseSQLCAGRP(Typdef typdef) throws org.apache.derby.client.am.DisconnectException, SqlException { if (readFdocaOneByte() == CodePoint.NULLDATA) { return null; } int sqlcode = readFdocaInt(); byte[] sqlstate = readFdocaBytes(5); byte[] sqlerrproc = read... |
curOpt.addOrLoadBestPlanMapping(false, curOpt); | curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt); | public boolean getNextDecoratedPermutation() throws StandardException { boolean retval; Optimizable curOpt = optimizableList.getOptimizable(proposedJoinOrder[joinPosition]); double originalRowCount = 0.0; // RESOLVE: Should we step through the different join strategies here? /* Returns true until all acc... |
curOpt.updateBestPlanMap(FromTable.REMOVE_PLAN, curOpt); | public boolean getNextDecoratedPermutation() throws StandardException { boolean retval; Optimizable curOpt = optimizableList.getOptimizable(proposedJoinOrder[joinPosition]); double originalRowCount = 0.0; // RESOLVE: Should we step through the different join strategies here? /* Returns true until all acc... | |
pullMe.addOrLoadBestPlanMapping(false, this); | pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this); | public boolean getNextPermutation() throws StandardException { /* Don't get any permutations if there is nothing to optimize */ if (numOptimizables < 1) { if (optimizerTrace) { trace(NO_TABLES, 0, 0, 0.0, null); } return false; } /* Make sure that all Optimizables init their access paths. * (They w... |
endOfRoundCleanup(); | public boolean getNextPermutation() throws StandardException { /* Don't get any permutations if there is nothing to optimize */ if (numOptimizables < 1) { if (optimizerTrace) { trace(NO_TABLES, 0, 0, 0.0, null); } return false; } /* Make sure that all Optimizables init their access paths. * (They w... | |
pullMe.addOrLoadBestPlanMapping(false, this); | pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this); | private void rewindJoinOrder() throws StandardException { for (; ; joinPosition--) { Optimizable pullMe = optimizableList.getOptimizable( proposedJoinOrder[joinPosition]); pullMe.pullOptPredicates(predicateList); if (reloadBestPlan) pullMe.addOrLoadBestPlanMapping(false, this); proposedJoinOrd... |
this(agent); | this(agent, false); | public Clob(Agent agent, String string) { this(agent); string_ = string; sqlLength_ = string_.length(); lengthObtained_ = true; dataType_ |= STRING; } |
if( willBeLayerBStreamed() ) throw new SqlException(agent_.logWriter_, LOB_OBJECT_LENGTH_UNKNOWN_YET); | public long length() throws SQLException { //call checkValidity to exit by throwing a SQLException if //the Clob object has been freed by calling free() on it checkValidity(); try { synchronized (agent_.connection_) { if (agent_.loggingEna... | |
String cpName = (String)codePointNameTable.get(new Integer(cp)); String reqCPName = (String)codePointNameTable.get(new Integer(reqCP)); | String cpName = codePointNameTable.lookup(cp); String reqCPName = codePointNameTable.lookup(reqCP); | private void cpError(int cp, int reqCP) throws IOException { String cpName = (String)codePointNameTable.get(new Integer(cp)); String reqCPName = (String)codePointNameTable.get(new Integer(reqCP)); fail("wrong codepoint val = " + Integer.toHexString(cp) + "("+cpName+")" + ", required codepoint = " + Integer.t... |
ConnectionPoolDataSource ds = getConnectionPoolDataSource(); | ConnectionPoolDataSource ds = TestDataSourceFactory.getConnectionPoolDataSource(); | private void vetConnectionPooledDataSource ( HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { ConnectionPoolDataSource ds = getConnectionPoolDataSource(); PooledConnection pc = ds.getPooledConnection (CONFIG.getUserName(), CONFIG.getUserPassword()); Connection conn =... |
DataSource ds = getDataSource(); | DataSource ds = TestDataSourceFactory.getDataSource(); | private void vetDataSource ( HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { DataSource ds = getDataSource(); Connection conn = ds.getConnection(); vetObject( ds, unsupportedList, notUnderstoodList ); connectionWorkhorse( conn, unsupportedList, notUnderstoodList ); } |
XADataSource ds = getXADataSource(); | XADataSource ds = TestDataSourceFactory.getXADataSource(); | private void vetXADataSource ( HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { XADataSource ds = getXADataSource(); XAConnection xaconn = ds.getXAConnection (CONFIG.getUserName(), CONFIG.getUserPassword()); Connection conn = xaconn.getConnection(); vetObject( d... |
public void dropAllDeclaredGlobalTempTables() throws StandardException { | private void dropAllDeclaredGlobalTempTables() throws StandardException { | public void dropAllDeclaredGlobalTempTables() throws StandardException { if (allDeclaredGlobalTempTables == null) return; DependencyManager dm = getDataDictionary().getDependencyManager(); StandardException topLevelStandardException = null; //collect all the exceptions we might receive while dropping the tem... |
protected String addResultSet(ResultSet value) throws SQLException | protected String addResultSet(ResultSet value, int holdValue) throws SQLException | protected String addResultSet(ResultSet value) throws SQLException { DRDAResultSet newDrdaRs = null; int rsNum = numResultSets; String newRsPkgcnstknStr = calculateResultSetPkgcnstknStr(rsNum); if (rsNum == 0) newDrdaRs = currentDrdaRs; else { newDrdaRs = new DRDAResultSet(); // Multiple resultSets we nee... |
newDrdaRs.withHoldCursor = holdValue; | protected String addResultSet(ResultSet value) throws SQLException { DRDAResultSet newDrdaRs = null; int rsNum = numResultSets; String newRsPkgcnstknStr = calculateResultSetPkgcnstknStr(rsNum); if (rsNum == 0) newDrdaRs = currentDrdaRs; else { newDrdaRs = new DRDAResultSet(); // Multiple resultSets we nee... | |
addResultSet(rs); | if(isCallable) addResultSet(rs,getResultSetHoldability(rs)); else addResultSet(rs,withHoldCursor); | protected boolean execute() throws SQLException { boolean hasResultSet = ps.execute(); // java.sql.Statement says any result sets that are opened // when the statement is re-executed must be closed; this // is handled by the call to "ps.execute()" above--but we // also have to reset our 'numResultSets' counter, s... |
(tc, null, null, 100, false, true); | (activation, null, null, 100, false, true); | private void notifyForUpdateCursor(DataValueDescriptor[] row, DataValueDescriptor[] newBaseRow, RowLocation rl, TableScanResultSet tableScan) throws StandardException { int[] indexCols = tableScan.indexCols; int[] changedCols = constants.changedColumnIds; boolean placedForward = false, ascending, decided ... |
deletedRowHolder = new TemporaryRowHolderImpl(tc, properties, triggerResultDescription); | deletedRowHolder = new TemporaryRowHolderImpl(activation, properties, triggerResultDescription); | void setup() throws StandardException { boolean firstOpen = (rowChanger == null); rowCount = 0; /* Cache query plan text for source, before it gets blown away */ if (lcc.getRunTimeStatisticsMode()) { /* savedSource nulled after run time statistics generation */ savedSource = source; } /* Get or re-use the... |
insertedRowHolder = new TemporaryRowHolderImpl(tc, properties, triggerResultDescription); | insertedRowHolder = new TemporaryRowHolderImpl(activation, properties, triggerResultDescription); | void setup() throws StandardException { boolean firstOpen = (rowChanger == null); rowCount = 0; /* Cache query plan text for source, before it gets blown away */ if (lcc.getRunTimeStatisticsMode()) { /* savedSource nulled after run time statistics generation */ savedSource = source; } /* Get or re-use the... |
ntt.commitNoSync(Transaction.RELEASE_LOCKS); | ntt.commit(); | public void compressContainer(BaseContainerHandle handle) throws StandardException { RawTransaction ntt = handle.getTransaction().startNestedTopTransaction(); int mode = handle.getMode(); if (SanityManager.DEBUG) { SanityManager.ASSERT((mode & ContainerHandle.MODE_FORUPDATE) == ContainerHandle... |
firstLog= privRandomAccessFile(logFile, "rws"); | firstLog = openLogFileInWriteMode(logFile); | public void boot(boolean create, Properties startParams) throws StandardException { dataDirectory = startParams.getProperty(PersistentService.ROOT); logDevice = startParams.getProperty(Attribute.LOG_DEVICE); if( logDevice != null) { // in case the user specifies logDevice in URL form String... |
public StorageRandomAccessFile openLogFileInWriteMode(StorageFile logFile) throws IOException | private StorageRandomAccessFile openLogFileInWriteMode(StorageFile logFile) throws IOException | public StorageRandomAccessFile openLogFileInWriteMode(StorageFile logFile) throws IOException { if(isWriteSynced) return privRandomAccessFile(logFile, "rws"); else return privRandomAccessFile(logFile, "rw"); } |
if(isWriteSynced) return privRandomAccessFile(logFile, "rws"); else return privRandomAccessFile(logFile, "rw"); | StorageRandomAccessFile log; try{ log = privRandomAccessFile(logFile, "rws"); }catch(FileNotFoundException ex) { isWriteSynced = false; log = privRandomAccessFile(logFile, "rw"); } return log ; | public StorageRandomAccessFile openLogFileInWriteMode(StorageFile logFile) throws IOException { if(isWriteSynced) return privRandomAccessFile(logFile, "rws"); else return privRandomAccessFile(logFile, "rw"); } |
theLog= privRandomAccessFile(logFile, "rws"); | theLog = openLogFileInWriteMode(logFile); | public void recover( RawStoreFactory rsf, DataFactory df, TransactionFactory tf) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(rsf != null, "raw store factory == null"); SanityManager.ASSERT(df != null, "data factory == null"); } checkCorrupt(); rawStore... |
newLog= privRandomAccessFile(newLogFile, "rws"); | newLog = openLogFileInWriteMode(newLogFile); | private void switchLogFile() throws StandardException { boolean switchedOver = false; ///////////////////////////////////////////////////// // Freeze the log for the switch over to a new log file. // This blocks out any other threads from sending log // record to the log stream. // // The switching of the log ... |
XADataSource xadatasource = TestDataSourceFactory.getXADataSource(); ConnectionPoolDataSource cpds = TestDataSourceFactory.getConnectionPoolDataSource(); pooledConnection = cpds.getPooledConnection(); xaconnection = xadatasource.getXAConnection(); pooledConnection.addStatementEventListener(this); xaconnection.ad... | if (xa) { XADataSource ds = TestDataSourceFactory.getXADataSource(); pooledConnection = ds.getXAConnection(); } else { ConnectionPoolDataSource ds = TestDataSourceFactory.getConnectionPoolDataSource(); pooledConnection = ds.getPooledConnection(); } StatementEventListener listener = new StatementEventListener() { public... | public void setUp() throws SQLException { XADataSource xadatasource = TestDataSourceFactory.getXADataSource(); ConnectionPoolDataSource cpds = TestDataSourceFactory.getConnectionPoolDataSource(); pooledConnection = cpds.getPooledConnection(); xaconnection = xadatasource.getXAConn... |
return (new TestSuite(StatementEventsTest.class, "StatementEventsTest suite")); | TestSuite suites = new TestSuite(); boolean[] truefalse = new boolean[] { true, false }; for (boolean xa : truefalse) { for (boolean callable : truefalse) { suites.addTest(new Suite(xa, callable)); } } return suites; | public static Test suite() { return (new TestSuite(StatementEventsTest.class, "StatementEventsTest suite")); } |
private void doCatch(String command) { | private boolean doCatch(String command) { | private void doCatch(String command) { // this retries the failed statement // as a JSQL statement; it uses the // ijParser since that maintains our // connection and state. try { boolean elapsedTimeOn = ijParser.getElapsedTimeState(); long beginTime = 0; long endTime; if (elapsedTimeOn) { beginTime... |
return false; | private void doCatch(String command) { // this retries the failed statement // as a JSQL statement; it uses the // ijParser since that maintains our // connection and state. try { boolean elapsedTimeOn = ijParser.getElapsedTimeState(); long beginTime = 0; long endTime; if (elapsedTimeOn) { beginTime... | |
if (util.getSystemProperty("ij.exceptionTrace") != null) { | if (ijExceptionTrace != null) { | private void doTrace(Throwable t) { if (util.getSystemProperty("ij.exceptionTrace") != null) { t.printStackTrace(out); } out.flush(); } |
JDBCDisplayUtil.doTrace(out, e); | doTrace(e); | private void handleSQLException(LocalizedOutput out, SQLException e) throws ijFatalException { String errorCode; String sqlState = null; SQLException fatalException = null; if (showErrorCode) { errorCode = langUtil.getTextMessage("IJ_Erro0", langUtil.getNumberAsString(e.getErrorCode())); } else { errorC... |
scriptErrorCount++; if (command != null) doCatch(command); | if (command != null) scriptErrorCount += doCatch(command) ? 0 : 1; | private int runScriptGuts() { int scriptErrorCount = 0; boolean done = false; String command = null; while (!ijParser.exit && !done) { try{ ijParser.setConnection(connEnv[currCE], (numConnections > 1)); } catch(Throwable t){ //do nothing } connEnv[currCE].doPrompt(true, out); try { ... |
generateParameterHolders(acb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { JavaValueNode methodCallBody; /* generate the parameters */ generateParameterValueSet(acb); /* * Skip over the JavaToSQLValueNode and call generate() for the JavaValueNode. * (This skips over generated ... | |
passed = testDERBY1706(con1, s) && passed; | public static void main(String[] args) { boolean passed = true; Connection con1 = null, con2 = null; Statement s = null; /* Run all parts of this test, and catch any exceptions */ try { System.out.println("Test declaredGlobalTempTableJava starting"); /* Load the JDBC Driver class */ // use the ij utility ... | |
if (e.getMessageId().equals(SQLState.BLOB_SETPOSITION_FAILED)) | if (e.getMessageId().equals(SQLState.BLOB_LENGTH_TOO_LONG)) | public byte[] getBytes(long startPos, int length) throws SQLException { boolean pushStack = false; try { if (startPos < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(startPos)); if (length <= 0) ... |
throw StandardException.newException(SQLState.BLOB_NULL_PATTERN); | throw StandardException.newException(SQLState.BLOB_NULL_PATTERN_OR_SEARCH_STR); | public long position(byte[] pattern, long start) throws SQLException { boolean pushStack = false; try { if (start < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(start)); if (pattern == null) ... |
if (e.getMessageId().equals(SQLState.BLOB_SETPOSITION_FAILED)) | if (e.getMessageId().equals(SQLState.BLOB_LENGTH_TOO_LONG)) | public long position(byte[] pattern, long start) throws SQLException { boolean pushStack = false; try { if (start < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(start)); if (pattern == null) ... |
throw StandardException.newException(SQLState.BLOB_SETPOSITION_FAILED); | throw StandardException.newException(SQLState.BLOB_LENGTH_TOO_LONG); | private void setPosition(long newPos) throws StandardException, IOException { if (SanityManager.DEBUG) SanityManager.ASSERT(newPos >= 0); if (isBytes) pos = newPos; else { // Always resets the stream to the beginning first, because user can ... |
catch( PrivilegedActionException pae) { return null;} | catch( PrivilegedActionException pae) { return null; } catch(SecurityException se) { return null; } | private synchronized String privGetCanonicalPath(final StorageFile file) { actionCode = STORAGE_FILE_GET_CANONICALPATH_ACTION; actionStorageFile = file; try { return (String) AccessController.doPrivileged( this); } catch( PrivilegedActionException pae) { retur... |
if (type == StatementType.SET_SCHEMA_DYNAMIC) generateParameterHolders(acb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { //generate the parameters for the DYNAMIC SET SCHEMA if (type == StatementType.SET_SCHEMA_DYNAMIC) generateParameterValueSet(acb); // The generated java is the expression: // return ResultSetFactory.getMisc... | |
subStrings.addElement(".fffffffff"); | public void exec (File srcFile, File dstFile, InputStream isSed, boolean isJCC, boolean isI18N, boolean isJDBC4) throws IOException { String hostName = TestUtil.getHostName(); // Vector for storing lines to be deleted Vector deleteLines = new Vector(); deleteLines.addElement... | |
deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\""); | deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " + quoteSqlIdentifier(getCursorName())); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... |
LanguageConnectionContext lcc = getEmbedConnection().getLanguageConnection(); | lcc = getEmbedConnection().getLanguageConnection(); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... |
StatementContext statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L); | statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... |
if (statementContext != null) lcc.popStatementContext(statementContext, null); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... | |
return "\"" + targetTable.getSchemaName() + "\".\"" + targetTable.getBaseName() + "\""; | return quoteSqlIdentifier(targetTable.getSchemaName()) + "." + quoteSqlIdentifier(targetTable.getBaseName()); | private String getFullBaseTableName(ExecCursorTableReference targetTable) { //using quotes to preserve case sensitivity if (targetTable.getSchemaName() != null) return "\"" + targetTable.getSchemaName() + "\".\"" + targetTable.getBaseName() + "\""; else return "\"" + targetTable.getBaseName() + "\""; } |
return "\"" + targetTable.getBaseName() + "\""; | return quoteSqlIdentifier(targetTable.getBaseName()); | private String getFullBaseTableName(ExecCursorTableReference targetTable) { //using quotes to preserve case sensitivity if (targetTable.getSchemaName() != null) return "\"" + targetTable.getSchemaName() + "\".\"" + targetTable.getBaseName() + "\""; else return "\"" + targetTable.getBaseName() + "\""; } |
insertSQL.append("\"" + rd.getColumnDescriptor(i).getName() + "\""); | insertSQL.append(quoteSqlIdentifier( rd.getColumnDescriptor(i).getName())); | public void insertRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeInsert(); setupContextStack(); LanguageConnectionContext lcc = null; StatementContext statementContext = null; try { /* ... |
if (statementContext != null) lcc.popStatementContext(statementContext, null); | public void insertRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeInsert(); setupContextStack(); LanguageConnectionContext lcc = null; StatementContext statementContext = null; try { /* ... | |
updateWhereCurrentOfSQL.append("\"" + rd.getColumnDescriptor(i).getName() + "\"=?"); | updateWhereCurrentOfSQL.append(quoteSqlIdentifier( rd.getColumnDescriptor(i).getName()) + "=?"); | public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); LanguageConnectionContex... |
updateWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\""); | updateWhereCurrentOfSQL.append(" WHERE CURRENT OF " + quoteSqlIdentifier(getCursorName())); | public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); LanguageConnectionContex... |
return getBigDecimal().toString(); | return getString(); | public String toString() { if (isNull()) return "NULL"; else return getBigDecimal().toString(); } |
if (reader.isChainedWithSameID()) parseEXCSQLSTTobjects(stmt); else if (isProcedure && (needPrepareCall)) { String prepareString = "call " + stmt.procName +"()"; if (SanityManager.DEBUG) trace ("$$$prepareCall is: "+prepareString); database.getConnection().clearWarnings(); CallableStatement cs = (CallableStatement)... | boolean hasResultSet; if (reader.isChainedWithSameID()) { hasResultSet = parseEXCSQLSTTobjects(stmt); } else { if (isProcedure && (needPrepareCall)) { String prepareString = "call " + stmt.procName +"()"; if (SanityManager.DEBUG) trace ("$$$prepareCall is: "+prepareString); database.getConnection().clearWarnings();... | private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; Pkgnamcsn pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default va... |
private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException | private boolean parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException | private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, typeDefChanged = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint... |
boolean gotSQLDTA = false, typeDefChanged = false; | boolean gotSQLDTA = false, gotEXTDTA = false; boolean result = false; | private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, typeDefChanged = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint... |
typeDefChanged = true; | stmt.setTypDefValues(); | private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, typeDefChanged = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint... |
readAndSetAllExtParams(stmt); | readAndSetAllExtParams(stmt, true); stmt.ps.clearWarnings(); result = stmt.execute(); gotEXTDTA = true; | private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, typeDefChanged = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint... |
if (typeDefChanged) stmt.setTypDefValues(); | if (! gotEXTDTA) { stmt.ps.clearWarnings(); result = stmt.execute(); } return result; | private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException { int codePoint; boolean gotSQLDTA = false, typeDefChanged = false; do { correlationID = reader.readDssHeader(); while (reader.moreDssData()) { codePoint = reader.readLengthAndCodePoint(); switch(codePoint... |
readAndSetAllExtParams(stmt); | readAndSetAllExtParams(stmt, 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: ... |
readAndSetAllExtParams(stmt); | readAndSetAllExtParams(stmt, false); | private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { String strVal; PreparedStatement ps = stmt.getPreparedStatement(); int codePoint; EngineParameterMetaData pmeta = null; Vector paramDrdaTypes = new Vector(); Vector paramLens = new Vector(); ArrayList paramExtPositions... |
private void readAndSetAllExtParams(DRDAStatement stmt) | private void readAndSetAllExtParams(final DRDAStatement stmt, final boolean streamLOB) | private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam... |
((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue()); | ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(), ((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue(), doStreamLOB); | private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam... |
int drdaType, int extLen) | int drdaType, int extLen, boolean streamLOB) | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... |
byte[] paramBytes = reader.getExtData(checkNullability); String paramString = null; | final byte[] paramBytes; final String paramString; | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... |
if (SanityManager.DEBUG) { if (paramBytes==null) { trace("parameter value is NULL (LOB)"); | paramString = ""; final boolean useSetBinaryStream = stmt.getParameterMetaData().getParameterType(i+1)==Types.BLOB; if (streamLOB && useSetBinaryStream) { paramBytes = null; final EXTDTAReaderInputStream stream = reader.getEXTDTAReaderInputStream(checkNullability); if (stream==null) { ps.setBytes(i+1, null); | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... |
trace("parameter value is a LOB with length: " + paramBytes.length); | ps.setBinaryStream(i+1, stream, (int) stream.getLength()); } if (SanityManager.DEBUG) { if (stream==null) { trace("parameter value : NULL"); } else { trace("parameter value will be streamed"); } } } else { paramBytes = reader.getExtData(checkNullability); if (paramBytes==null || !useSetBinaryStream) { ps.setBytes(i+1,... | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... |
ps.setBytes(i+1, paramBytes); | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... | |
paramBytes = null; paramString = ""; | private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR... | |
dd.getDependencyManager().invalidateFor(routinePermsDesc, DependencyManager.REVOKE_PRIVILEGE, lcc); | dd.getDependencyManager().invalidateFor(routinePermsDesc, DependencyManager.REVOKE_EXECUTE_PRIVILEGE, lcc); | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { // Check that the current user has permission to grant the privileges. LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary... |
maxMaxWidth = -1; | maxMaxWidth = TypeId.DATE_MAXWIDTH; maxPrecision = TypeId.DATE_MAXWIDTH; | private void setTypeIdSpecificInstanceVariables() { switch (formatId) { case StoredFormatIds.BIT_TYPE_ID: typePrecedence = BIT_PRECEDENCE; javaTypeName = "byte[]"; ... |
maxMaxWidth = -1; | maxScale = TypeId.TIME_SCALE; maxMaxWidth = TypeId.TIME_MAXWIDTH; maxPrecision = TypeId.TIME_MAXWIDTH; | private void setTypeIdSpecificInstanceVariables() { switch (formatId) { case StoredFormatIds.BIT_TYPE_ID: typePrecedence = BIT_PRECEDENCE; javaTypeName = "byte[]"; ... |
maxMaxWidth = -1; | maxScale = TypeId.TIMESTAMP_SCALE; maxMaxWidth = TypeId.TIMESTAMP_MAXWIDTH; maxPrecision = TypeId.TIMESTAMP_MAXWIDTH; | private void setTypeIdSpecificInstanceVariables() { switch (formatId) { case StoredFormatIds.BIT_TYPE_ID: typePrecedence = BIT_PRECEDENCE; javaTypeName = "byte[]"; ... |
}finally{ if( shutdownLogWriter != null ){ shutdownLogWriter.flush(); shutdownLogWriter.close(); } } | public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ... | |
throw StandardException.newException( SQLState.NOT_IMPLEMENTED, "XMLQUERY"); | return xmlContext.XMLQuery(result, getSqlXmlUtil()); | public XMLDataValue XMLQuery(StringDataValue xExpr, XMLDataValue xmlContext, XMLDataValue result) throws StandardException { // Incremental development (DERBY-688); this is not yet // implemented. throw StandardException.newException( SQLState.NOT_IMPLEMENTED, "XMLQU... |
public String getGrantee() { return grantee;} | public final String getGrantee() { return grantee;} | public String getGrantee() { return grantee;} |
public String getGrantor() { return grantor;} | public final String getGrantor() { return grantor;} | public String getGrantor() { return grantor;} |
cCount = tc.openSortRowSource(sortIds[index]); | cCount = new CardinalityCounter(tc.openSortRowSource(sortIds[index])); | private void updateIndex(long newHeapConglom, DataDictionary dd, int index, long[] newIndexCongloms) throws StandardException { ConglomerateController indexCC; Properties properties = new Properties(); ConglomerateDescriptor cd; // Get the ConglomerateDescriptor for the index cd = td.getConglomerateDescri... |
} if (updateStatistics) { dd.dropStatisticsDescriptors(td.getUUID(), cd.getUUID(), tc); long numRows; if ((numRows = ((CardinalityCounter)cCount).getRowCount()) > 0) { long[] c = ((CardinalityCounter)cCount).getCardinality(); for (int i = 0; i < c.length; i++) { StatisticsDescriptor statDesc = new StatisticsDescriptor... | private void updateIndex(long newHeapConglom, DataDictionary dd, int index, long[] newIndexCongloms) throws StandardException { ConglomerateController indexCC; Properties properties = new Properties(); ConglomerateDescriptor cd; // Get the ConglomerateDescriptor for the index cd = td.getConglomerateDescri... | |
jvm.setD(jvmProps); | 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... | |
jvm.setD(jvmProps); | 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... | |
((OptimizerImpl)optimizer).prepForNextRound(); | optimizer.prepForNextRound(); | protected ResultSetNode optimizeSource( Optimizer optimizer, ResultSetNode sourceResultSet, PredicateList predList, CostEstimate outerCost) throws StandardException { ResultSetNode retval; if (sourceResultSet instanceof FromTable) { FromList optList = (FromList) getNodeFactory().getNode(... |
case REVOKE_EXECUTE_PRIVILEGE: return "REVOKE EXECUTE PRIVILEGE"; | public String getActionString(int action) { switch (action) { case ALTER_TABLE: return "ALTER TABLE"; case RENAME: //for rename table and column return "RENAME"; case RENAME_INDEX: return "RENAME INDEX"; case COMPILE_FAILED: return "COMPILE FAILED"; case DROP_TABLE: return "DROP TABLE"; ca... | |
rowHolder = new TemporaryRowHolderImpl(tc, properties, (ResultDescription)null); | rowHolder = new TemporaryRowHolderImpl(activation, properties, (ResultDescription) null); | private void doDeferredInsert() throws StandardException { if (rowHolder == null) { Properties properties = new Properties(); // Get the properties on the index openIndexCC().getInternalTablePropertySet(properties); /* ** Create our row holder. it is ok to skip passing ** in the result description bec... |
double optimizerEstimatedCost | double optimizerEstimatedCost, String userSuppliedOptimizerOverrides | public RealJoinResultSetStatistics( int numOpens, int rowsSeen, int rowsFiltered, long constructorTime, long openTime, long nextTime, long closeTime, int resultSetNumber, int rowsSeenLeft, int rowsSeenRight, int rowsR... |
this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides; | public RealJoinResultSetStatistics( int numOpens, int rowsSeen, int rowsFiltered, long constructorTime, long openTime, long nextTime, long closeTime, int resultSetNumber, int rowsSeenLeft, int rowsSeenRight, int rowsR... | |
passed = testDerby62(conn) && passed; | public static void main(String[] args) { System.out.println("Test closed starting"); boolean passed = true; try { Connection conn; // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); String url = conn.getMetaData().getURL();... | |
if (SQLValue.isParameterNode()) | if (SQLValue.requiresTypeFromContext()) | public JavaValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { boolean nullParameter = false; String[] parmTypeNames; /* NULL and ? not allowed as receivers */ if (receiver instanceof SQLToJavaValueNode) { ValueNode SQLValue = ((... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.