rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE"); rs.next(); | rs = stmt.executeQuery("SELECT c1 FROM t1 FOR UPDATE"); rs.next(); rs.updateInt(1,123); | 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... |
rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR UPDATE"); | rs = stmt.executeQuery("SELECT * FROM tableWithPrimaryKey FOR UPDATE"); | 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... |
rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR UPDATE"); | rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE"); | 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... |
System.out.println("Since after deleteRow(), ResultSet is positioned before the next row, getXXX will fail"); | System.out.println("Since after deleteRow(), in embedded mode, ResultSet is positioned before the next row, getXXX will fail"); System.out.println("In Network Server mode, the ResultSet stays on the deleted row after deleteRow and hence no error for getXXX"); | 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... |
System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); | if (TestUtil.isEmbeddedFramework()) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); } else System.out.println("Got unexpected exception " + e.getMessage()); | 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... |
System.out.println("Since after updateRow(), ResultSet is positioned before the next row, getXXX will fail"); | System.out.println("Since after updateRow(), in embedded mode, ResultSet is positioned before the next row, getXXX will fail"); System.out.println("In Network Server mode, the ResultSet stays on the updated row after updateRow and hence no error for getXXX"); | 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... |
rs.updateString(2,"bbbb"); try { rs.updateRow(); System.out.println("FAIL!!! updateRow should have failed"); } catch (SQLException e) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); } | try { rs.updateString(2,"bbbb"); System.out.println("FAIL!!! updateString on readonly column should have failed"); } catch (SQLException e) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); } System.out.println("attempt to get an updatable resultset ... | 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... |
if (updateXXXRulesTable[sqlType-1][updateXXXName-1].equals("ERROR")) { | if (updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR")) { | 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... |
if (updateXXXRulesTable[sqlType-1][updateXXXName-1].equals("ERROR")) | if (updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR")) | 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... |
rs.updateInt(2,22); try { rs.updateRow(); System.out.println("FAIL!!! updateRow should have failed because c12 is not the FOR UPDATE columns list."); | try { rs.updateInt(2,22); System.out.println("FAIL!!! updateInt should have failed because c12 is not the FOR UPDATE columns list."); | 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... |
realConnection.dropAllDeclaredGlobalTempTables(); | realConnection.resetFromPool(); | protected void resetRealConnection() throws SQLException { // ensure any outstanding changes from the previous // user are rolledback. realConnection.rollback(); // clear any warnings that are left over realConnection.clearWarnings(); // need to reset transaction isolation, autocommit, readonly, holdability stat... |
printWriter.print(header + "Detected an improper TCP/IP client configuration."); printWriter.print(header + "Unable to determine the IP address of your local host: "); printWriter.print(e.getMessage()); printWriter.println(header + "Make sure your client machine has a properly configured IP address."); | printWriter.println(header + msgutil.getTextMessage(UNKNOWN_HOST_ID, e.getMessage())); | private static void detectLocalHost(java.lang.SecurityManager security, java.io.PrintWriter printWriter) { String header = "[derby] "; // getLocalHost() will hang the HotJava 1.0 browser with a high security manager. if (security == null) { try { printWriter.print(head... |
printWriter.println(header + "Security manager does not permit access to system property " + property); | printWriter.println(header + msgutil.getTextMessage(SECURITY_MANAGER_NO_ACCESS_ID, property)); | private static void printSystemProperty(java.lang.SecurityManager security, String prefix, String property, java.io.PrintWriter printWriter) { String header = "[derby] "; sy... |
void check( Vector validProps){ | public void check( Vector validProps){ | void check( Vector validProps){ checkName( validProps); //checkValue(); displayErrors(); } |
void addError(String aString) { | public void addError(String aString) { | void addError(String aString) { //Keep track of error message for later display. if (!errors.contains(aString)) errors.addElement(aString); } |
void setName(String aString){ | public void setName(String aString){ | void setName(String aString){ name = aString; } |
void setValue(String aString){ | public void setValue(String aString){ | void setValue(String aString){ value = aString; } |
void setToken(String aString){ | public void setToken(String aString){ | void setToken(String aString){ token = aString; } |
localUtil.init(); | private LocalizedResource getCurrentAppUI(HttpServletRequest request) { LocalizedResource localUtil; String acceptLanguage = request.getHeader("Accept-Language"); localUtil = new LocalizedResource(null,null,SERVLET_PROP_MESSAGES); // if no language specified use one set by db2j.locale, db2j.codeset locale = null;... | |
LocalizedResource langUtil = new LocalizedResource(); | LocalizedResource langUtil = new LocalizedResource(null,null,SERVLET_PROP_MESSAGES); | public void init(ServletConfig config) throws ServletException { LocalizedResource langUtil = new LocalizedResource(); String port = config.getInitParameter("portNumber"); if (port != null) { int p = Integer.valueOf(port).intValue(); if (p > 0) portNumber = p; } String tracingDirectory = config.getIni... |
st = conn.prepareStatement("select text_data from t3"); | st = conn.prepareStatement("select " + "text_data as text_data_col1," + "text_data as text_data_col2 " + "from " + "t3"); | static private void printTestData(Connection conn) throws SQLException { PreparedStatement st = null; ResultSet rs = null; try{ st = conn.prepareStatement("select text_data from t3"); rs = st.executeQuery(); while(rs.next()){ printTestDataInARowViaStream(rs); printTestDataInARowViaRea... |
reader = rs.getCharacterStream(1); | reader = rs.getCharacterStream(2); | static private void printTestDataInARowViaReader(ResultSet rs) throws SQLException, IOException{ Reader reader = null; try{ reader = rs.getCharacterStream(1); for(int c = reader.read(); c > -1; c = reader.read()){ System.out.print(getCharacterCodeString((char) c)); ... |
return 28; | return 29; | public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca... |
public PMenuGraph(Composite par, int style, LogWriter l, SchemaMeta sch, PMenu sp) { this(par, style, sch, sp); } | public PMenuGraph(Composite par, int style, SchemaMeta sch, PMenu sp) { super(par, style); shell = par.getShell(); schema = sch; log = LogWriter.getInstance(); spoon = sp; canvas = this; iconsize = schema.props.getIconSize(); selrect = null; candidate = null; last_button = 0; selected_steps = null; selected_note = nu... | public PMenuGraph(Composite par, int style, LogWriter l, SchemaMeta sch, PMenu sp) { this(par, style, sch, sp); } |
getCompilerContext().pushCurrentPrivType(getPrivType()); getCompilerContext().addRequiredTablePriv(targetTableDescriptor); getCompilerContext().popCurrentPrivType(); | if (isPrivilegeCollectionRequired()) { getCompilerContext().pushCurrentPrivType(getPrivType()); getCompilerContext().addRequiredTablePriv(targetTableDescriptor); getCompilerContext().popCurrentPrivType(); } | public QueryTreeNode bind() throws StandardException { // We just need select privilege on the expressions getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV); FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), ... |
if (!(((ValueNode) argumentsList.elementAt(index)).isParameterNode())) | if (!(((ValueNode) argumentsList.elementAt(index)).requiresTypeFromContext())) | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { //bind all the arguments argumentsList.bindExpression(fromList, subqueryList, aggregateVector); //There should be more than one argument if (argumentsList.size() < 2) throw S... |
if (((ValueNode) argumentsList.elementAt(index)).isParameterNode()) | if (((ValueNode) argumentsList.elementAt(index)).requiresTypeFromContext()) | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { //bind all the arguments argumentsList.bindExpression(fromList, subqueryList, aggregateVector); //There should be more than one argument if (argumentsList.size() < 2) throw S... |
((ParameterNode) argumentsList.elementAt(index)).setDescriptor(getTypeServices()); | ((ValueNode)argumentsList.elementAt(index)).setType(getTypeServices()); | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { //bind all the arguments argumentsList.bindExpression(fromList, subqueryList, aggregateVector); //There should be more than one argument if (argumentsList.size() < 2) throw S... |
publicKeyIn = null; publicKeyOut = null; | passwordSubstitute = null; secTokenIn = null; secTokenOut = null; | public void reset() { // Reset variables for connection re-use. Currently only takes care // of reset the variables that affect EUSRIDPWD security mechanism. (DERBY-1080) decryptedUserId = null; decryptedPassword = null; publicKeyIn = null; publicKeyOut = null; u... |
synonymTableName = targetTableName; | void verifyTargetTable() throws StandardException { DataDictionary dataDictionary = getDataDictionary(); if (targetTableName != null) { /* ** Get the TableDescriptor for the table we are inserting into */ SchemaDescriptor sdtc = getSchemaDescriptor(targetTableName.getSchemaName()); targetTa... | |
utilInstance.initConnections(); | public static void main(String[] args) throws Throwable{ ij.getPropertyArg(args); Connection conn = ij.startJBMS(); conn.setAutoCommit(false); conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); createTables(conn); utilMain utilInstance; Loca... | |
tableName = dd.getTableDescriptor(tableUUID).getName(); | if (tableUUID != null) tableName = dd.getTableDescriptor(tableUUID).getName(); | public ColPermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID tableUUID, String type, FormatableBitSet columns) throws StandardException { super (dd, grante... |
return new DDColumnPermissionsDependableFinder(StoredFormatIds.COLUMNS_PERMISSION_FINDER_V01_ID, type); | return new DDdependableFinder(StoredFormatIds.COLUMNS_PERMISSION_FINDER_V01_ID); | public DependableFinder getDependableFinder() { return new DDColumnPermissionsDependableFinder(StoredFormatIds.COLUMNS_PERMISSION_FINDER_V01_ID, type); } |
System.err.println("SQLException of shutting down was found."); | System.out.println("SQLException of shutting down was found."); | private static void verifyShutdownError(SQLException e) throws SQLException{ if(!isShutdownError(e)) throw e; System.err.println("SQLException of shutting down was found."); } |
"getProcedureColumns"); | "getProcedureColumns40"); | public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { return doGetProcCols(catalog, schemaPattern, procedureNamePattern, columnNamePattern, "getProcedureColumns"); } |
throw new SqlException(agent_.logWriter_, "resultSetHoldability property " + resultSetHoldability + " not supported"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_HOLDABILITY_PROPERTY), new Integer(resultSetHoldability)); | public Section getDynamicSection(int resultSetHoldability) throws SqlException { int cursorHoldIndex; if (resultSetHoldability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) { return getSection(freeSectionsHold_, packageNameWithHold__, cursorNamePrefixWithHold__, resultSetHoldability); ... |
throw new SqlException(agent_.logWriter_, "ResultSet for cursor " + cursorName + " is closed."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CLIENT_RESULT_SET_NOT_OPEN)); | ResultSet getPositionedUpdateResultSet(String cursorName) throws SqlException { ResultSet rs = (ResultSet) positionedUpdateCursorNameToResultSet_.get(cursorName); if (rs == null) { throw new SqlException(agent_.logWriter_, "ResultSet for cursor " + cursorName + " is close... |
throw new SqlException(agent_.logWriter_, "Run out of sections to use,sections limited to 32k currently"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.EXCEEDED_MAX_SECTIONS), "32k"); | protected Section getSection(java.util.Stack freeSections, String packageName, String cursorNamePrefix, int resultSetHoldability) throws SqlException { if (!freeSections.empty()) { return (Section) freeSections.pop(); } else if (nextAvailableSectionNumber_ < (maxNumSections_ - 1)) { ... |
if( arg.isParameterNode() && arg.getTypeId() == null) | if( arg.requiresTypeFromContext() && arg.getTypeId() == null) | private boolean bindParameter( ValueNode arg, int jdbcType) throws StandardException { if( arg.isParameterNode() && arg.getTypeId() == null) { ((ParameterNode) arg).setDescriptor( new DataTypeDescriptor(TypeId.getBuiltInTypeId( jdbcType), true)); return true; } r... |
((ParameterNode) arg).setDescriptor( new DataTypeDescriptor(TypeId.getBuiltInTypeId( jdbcType), true)); | arg.setType( new DataTypeDescriptor(TypeId.getBuiltInTypeId( jdbcType), true)); | private boolean bindParameter( ValueNode arg, int jdbcType) throws StandardException { if( arg.isParameterNode() && arg.getTypeId() == null) { ((ParameterNode) arg).setDescriptor( new DataTypeDescriptor(TypeId.getBuiltInTypeId( jdbcType), true)); return true; } r... |
if( receiver.isParameterNode()) | if( receiver.requiresTypeFromContext()) | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
if( leftOperand.isParameterNode()) | if( leftOperand.requiresTypeFromContext()) | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
((ParameterNode) receiver).setDescriptor(getVarcharDescriptor()); | receiver.setType(getVarcharDescriptor()); | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
((ParameterNode) receiver).setDescriptor( | receiver.setType( | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
((ParameterNode) leftOperand).setDescriptor(getVarcharDescriptor()); | leftOperand.setType(getVarcharDescriptor()); | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
((ParameterNode) leftOperand).setDescriptor( | leftOperand.setType( | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
if( rightOperand.isParameterNode()) | if( rightOperand.requiresTypeFromContext()) | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
((ParameterNode) rightOperand).setDescriptor( | rightOperand.setType( | public ValueNode locateBind() throws StandardException { TypeId firstOperandType, secondOperandType, offsetType; /* * Is there a ? parameter for the first arg. Copy the * left/firstOperand's. If the left/firstOperand are both parameters, * both will be max length. */ if( receiver.isParameterNode()) { ... |
if (receiver.isParameterNode()) | if (receiver.requiresTypeFromContext()) | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
((ParameterNode) receiver).setDescriptor(getVarcharDescriptor()); | receiver.setType(getVarcharDescriptor()); | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
if (leftOperand.isParameterNode()) | if (leftOperand.requiresTypeFromContext()) | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
((ParameterNode) leftOperand).setDescriptor( | leftOperand.setType( | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
if ((rightOperand != null) && rightOperand.isParameterNode()) | if ((rightOperand != null) && rightOperand.requiresTypeFromContext()) | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
((ParameterNode) rightOperand).setDescriptor( | rightOperand.setType( | public ValueNode substrBind() throws StandardException { TypeId receiverType; TypeId resultType; // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if substr has a ? receiver, ** its type is varchar with the im... |
if (receiver.isParameterNode()) | if (receiver.requiresTypeFromContext()) | private ValueNode trimBind() throws StandardException { TypeId receiverType; TypeId resultType = TypeId.getBuiltInTypeId(Types.VARCHAR); // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if trim has a ? receiver,... |
((ParameterNode) receiver).setDescriptor(getVarcharDescriptor()); | receiver.setType(getVarcharDescriptor()); | private ValueNode trimBind() throws StandardException { TypeId receiverType; TypeId resultType = TypeId.getBuiltInTypeId(Types.VARCHAR); // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if trim has a ? receiver,... |
if (leftOperand.isParameterNode()) | if (leftOperand.requiresTypeFromContext()) | private ValueNode trimBind() throws StandardException { TypeId receiverType; TypeId resultType = TypeId.getBuiltInTypeId(Types.VARCHAR); // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if trim has a ? receiver,... |
((ParameterNode) leftOperand).setDescriptor(getVarcharDescriptor()); | leftOperand.setType(getVarcharDescriptor()); | private ValueNode trimBind() throws StandardException { TypeId receiverType; TypeId resultType = TypeId.getBuiltInTypeId(Types.VARCHAR); // handle parameters here /* Is there a ? parameter for the receiver? */ if (receiver.isParameterNode()) { /* ** According to the SQL standard, if trim has a ? receiver,... |
if (RowUtil.isRowEmpty(this.init_startKeyValue, (FormatableBitSet) null)) | if (RowUtil.isRowEmpty(this.init_startKeyValue)) | protected void positionAtInitScan( DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier[][], DataValueDescriptor[] stopKeyValue, int stopSearchOperator, RowPosition pos) throws StandardException ... |
if (RowUtil.isRowEmpty(this.init_stopKeyValue, (FormatableBitSet) null)) | if (RowUtil.isRowEmpty(this.init_stopKeyValue)) | protected void positionAtInitScan( DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier[][], DataValueDescriptor[] stopKeyValue, int stopSearchOperator, RowPosition pos) throws StandardException ... |
suite.addTest(PrepareExecuteDDL.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 new BigDecimal(value); | return new BigDecimal(Double.toString(value)); | public BigDecimal getBigDecimal() { if (isNull()) return null; return new BigDecimal(value); } |
while ((valid = inStream.read(ca, 0, ca.length)) != -1) | while (((valid = inStream.read(ca, 0, ca.length)) != -1) && !interrupted) | public void run() { //System.out.println("Thread run... " + tname); if ( in == null ) { System.out.println("The inputstream is null"); System.exit(1); } try { char[] ca = new char[1024]; int valid; interrupted = false; // Create an InputStreamReade... |
public int maxCapacity(); | public int maxCapacity( JoinStrategy joinStrategy, int maxMemoryPerTable) throws StandardException; | public int maxCapacity(); |
ddmScalarLen = ((buffer[pos++] & 0xff) << 8) + ((buffer[pos++] & 0xff) << 0); int codePoint = ((buffer[pos++] & 0xff) << 8) + ((buffer[pos++] & 0xff) << 0); | ddmScalarLen = readCodePoint(); int codePoint = readCodePoint(); | protected int readLengthAndCodePoint() throws DRDAProtocolException { ensureBLayerDataInBuffer (4, NO_ADJUST_LENGTHS); ddmScalarLen = ((buffer[pos++] & 0xff) << 8) + ((buffer[pos++] & 0xff) << 0); int codePoint = ((buffer[pos++] & 0xff) << 8) + ((buffer[pos++] & 0xff) << 0); if (SanityManager.DEBUG) trac... |
if (preparedStmt.completeCompile(qt)) { if (foundInCache) ((GenericLanguageConnectionContext)lcc).removeStatement(this); } | preparedStmt.completeCompile(qt); | private PreparedStatement prepMinion(LanguageConnectionContext lcc, boolean cacheMe, Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException { long beginTime = 0; long parseTime = 0; long bindTime = 0; long optimizeTime = 0; long generateTime = 0;... |
boolean reEncrypt = false; CipherFactory newCipherFactory = null; | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... | |
String dataEncryption = properties.getProperty(Attribute.DATA_ENCRYPTION); databaseEncrypted = Boolean.valueOf(dataEncryption).booleanValue(); if (!create && restoreFromBackup == null) { String name = Monitor.getMonitor().getServiceName(this); PersistentService ps = Monitor.getMonitor().getServiceType(this)... | if (create) setupEncryptionEngines(create, restoreFromBackup, properties); | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... |
if (databaseEncrypted) { logFactory.setDatabaseEncrypted(); dataFactory.setDatabaseEncrypted(); } | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... | |
if (!create) { if(properties.getProperty( RawStoreFactory.DB_ENCRYPTION_STATUS) !=null) { handleIncompleteDatabaseEncryption(properties); } setupEncryptionEngines(create, restoreFromBackup, properties); } if (databaseEncrypted) { logFactory.setDatabaseEncrypted(); dataFactory.setDatabaseEncrypted(); } | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... | |
if (SanityManager.DEBUG) { if (SanityManager.DEBUG_ON(TEST_REENCRYPT_CRASH_BEFORE_COMMT)) { throw StandardException.newException( SQLState.LOG_IO_ERROR, new IOException(TEST_REENCRYPT_CRASH_BEFORE_COMMT)); } } transaction.commit(); | if (SanityManager.DEBUG) { crashOnDebugFlag(TEST_REENCRYPT_CRASH_BEFORE_COMMT); } | public void configureDatabaseForEncryption(Properties properties, boolean reEncrypt, CipherFactory newCipherFactory) throws StandardException { // check if the database can be encrypted. canEncrypt... |
logFactory.setDatabaseEncrypted(); logFactory.setupLogEncryption(); dataFactory.setDatabaseEncrypted(); databaseEncrypted = true; encryptDatabase = false; if (reEncrypt) { | if (!reEncrypt) { encryptDatabase = false; databaseEncrypted = true; dataFactory.setDatabaseEncrypted(); logFactory.setDatabaseEncrypted(); } else { | public void configureDatabaseForEncryption(Properties properties, boolean reEncrypt, CipherFactory newCipherFactory) throws StandardException { // check if the database can be encrypted. canEncrypt... |
logFactory.startNewLogFile(); properties.put(RawStoreFactory.DB_ENCRYPTION_STATUS, String.valueOf( RawStoreFactory.DB_ENCRYPTION_IN_PROGRESS)); if (reEncrypt) { if (externalKeyEncryption) { StorageFile verifyKeyFile = storageFactory.newStorageFile( Attribute.CRYPTO_EXTERNAL_KEY_VERIFY_FILE); Storage... | public void configureDatabaseForEncryption(Properties properties, boolean reEncrypt, CipherFactory newCipherFactory) throws StandardException { // check if the database can be encrypted. canEncrypt... | |
properties.put(RawStoreFactory.ENCRYPTION_BLOCKSIZE, String.valueOf(encryptionBlockSize)); currentCipherFactory.saveProperties(properties) ; if (reEncrypt) { currentCipherFactory.verifyKey(reEncrypt, storageFactory, properties); } | if (SanityManager.DEBUG) { crashOnDebugFlag(TEST_REENCRYPT_CRASH_AFTER_CHECKPOINT); } properties.put(RawStoreFactory.DB_ENCRYPTION_STATUS, String.valueOf( RawStoreFactory.DB_ENCRYPTION_IN_CLEANUP)); dataFactory.removeOldVersionOfContainers(false); if (reEncrypt) { if (externalKeyEncryption) { StorageFile oldVe... | public void configureDatabaseForEncryption(Properties properties, boolean reEncrypt, CipherFactory newCipherFactory) throws StandardException { // check if the database can be encrypted. canEncrypt... |
case COPY_STORAGE_FILE_TO_STORAGE_ACTION: return ReuseFactory.getBoolean(FileUtil.copyFile( (WritableStorageFactory) storageFactory, actionStorageFile, actionToStorageFile)); | 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... | |
if (autoCommit && (currentXid != null)) | if (autoCommit && (xaRes.getCurrentXid () != null)) | public void checkAutoCommit(boolean autoCommit) throws SQLException { if (autoCommit && (currentXid != null)) throw Util.generateCsSQLException(SQLState.CANNOT_AUTOCOMMIT_XA); super.checkAutoCommit(autoCommit); } |
if (currentXid != null) | if (xaRes.getCurrentXid () != null) | public void checkCommit() throws SQLException { if (currentXid != null) throw Util.generateCsSQLException(SQLState.CANNOT_COMMIT_XA); super.checkCommit(); } |
if (currentXid != null) | if (xaRes.getCurrentXid () != null) | public void checkRollback() throws SQLException { if (currentXid != null) throw Util.generateCsSQLException(SQLState.CANNOT_ROLLBACK_XA); super.checkRollback(); } |
if (currentXid != null) | if (xaRes.getCurrentXid () != null) | public void checkSavepoint() throws SQLException { if (currentXid != null) throw Util.generateCsSQLException(SQLState.CANNOT_ROLLBACK_XA); super.checkSavepoint(); } |
if (currentXid == null) { | if (xaRes.getCurrentXid () == null) { | public Connection getConnection() throws SQLException { Connection handle; // Is this just a local transaction? if (currentXid == null) { handle = super.getConnection(); } else { if (currentConnectionHandle != null) { // this can only happen if someone called start(Xid), // getConnection, getConnection (... |
return this; | return xaRes; | public final synchronized XAResource getXAResource() throws SQLException { checkActive(); return this; } |
this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides; | public DependentResultSet( long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qual... | |
case ALIASID_INDEX_NUM: row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null)); break; | public ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation) throws StandardException { ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length + 1); row.setColumn( row.nColumns(), rowLocation... | |
case ALIASID_INDEX_NUM: row = getExecutionFactory().getIndexableRow( 1); routineUUIDStr = ((RoutinePermsDescriptor) perm).getRoutineUUID().toString(); row.setColumn(1, getDataValueFactory().getCharDataValue( routineUUIDStr)); break; | public ExecIndexRow buildIndexKeyRow( int indexNumber, PermissionsDescriptor perm) throws StandardException { ExecIndexRow row = null; switch( indexNumber) { case GRANTEE_ALIAS_GRANTOR_INDEX_NUM: // RESOLVE We do not suppo... | |
public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); | public void updateObject(int columnIndex, Object x, int scale) throws SQLException { updateObject(columnIndex, x); | public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); int colType = getColumnType(columnIndex); if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(col... |
if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { | if ((colType == Types.DECIMAL) || (colType == Types.NUMERIC)) { if (scale < 0) throw newSQLException(SQLState.BAD_SCALE_VALUE, new Integer(scale)); | public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); int colType = getColumnType(columnIndex); if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(col... |
((UserDataValue) getDVDforColumnToBeUpdated(columnIndex, "updateObject")).setValue(x); return; | DataValueDescriptor value = updateRow.getColumn(columnIndex); int origvaluelen = value.getLength(); ((VariableSizeDataValue) value).setWidth(VariableSizeDataValue.IGNORE_PRECISION, scale, false); | public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); int colType = getColumnType(columnIndex); if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(col... |
throw noStateChangeException(t); | throw EmbedResultSet.noStateChangeException(t); | public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); int colType = getColumnType(columnIndex); if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(col... |
if (x == null) { updateNull(columnIndex); return; } if (x instanceof String) { updateString(columnIndex, (String) x); return; } if (x instanceof Boolean) { updateBoolean(columnIndex, ((Boolean) x).booleanValue()); return; } if (x instanceof Short) { updateShort(columnIndex, ((Short) x).shortValue()); return; } if (... | public void updateObject(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX("updateObject", columnIndex); int colType = getColumnType(columnIndex); if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(col... | |
try { TestUtil.getConnection("","shutdown=true"); } catch (SQLException sqle) { JDBCDisplayUtil.ShowSQLException(System.out, sqle); | if(! hangAfterSystemShutdown) { try { TestUtil.getConnection("","shutdown=true"); } catch (SQLException sqle) { JDBCDisplayUtil.ShowSQLException(System.out, sqle); } | 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... |
bcon.getLeftOperand().getTypeServices(), | new DataTypeDescriptor( bcon.getLeftOperand().getTypeServices(), true), | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { testCondition = testCondition.bindExpression(fromList, subqueryList, aggregateVector); if (thisIsNullIfNode) { //for NULLIF(V1,V2), parser binds thenElseList.elementAt(0) to unty... |
mb.push(value.toString()); | mb.push(value.getString()); | void generateConstant(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { switch (getNodeType()) { case C_NodeTypes.INT_CONSTANT_NODE: mb.push(value.getInt()); break; case C_NodeTypes.TINYINT_CONSTANT_NODE: mb.push(value.getByte()); break; case C_NodeTypes.SMALLINT_CONSTANT_NODE: m... |
cs.setString(2, "testLongVarChar"); | cs.setString(2, "TESTLONGVARCHAR"); | private static void streamTest10(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Testing 10 starts from here"); try { stmt = conn.createStatement(); //create the table stmt.executeUpdate("call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize... |
SQLState.LANG_UNEXPECTED_XML_EXCEPTION, xe); | SQLState.LANG_XML_QUERY_ERROR, xe, "XMLEXISTS"); | public BooleanDataValue XMLExists(SqlXmlUtil sqlxUtil) throws StandardException { if (this.isNull()) { // if the user specified a context node and that context // is null, result of evaluating the query is null // (per SQL/XML 6.17:General Rules:1.a), which means that we ... |
SQLState.LANG_NOT_AN_XML_DOCUMENT, xe); | SQLState.LANG_INVALID_XML_DOCUMENT, xe); | public XMLDataValue XMLParse(String text, boolean preserveWS, SqlXmlUtil sqlxUtil) throws StandardException { try { if (preserveWS) { // Currently the only way a user can view the contents of // an XML value is by explicitly calling XMLSERIALIZE. // So do... |
SQLState.LANG_UNEXPECTED_XML_EXCEPTION, xe); | SQLState.LANG_XML_QUERY_ERROR, xe, "XMLQUERY"); | public XMLDataValue XMLQuery(XMLDataValue result, SqlXmlUtil sqlxUtil) throws StandardException { if (this.isNull()) { // if the context is null, we return null, // per SQL/XML[2006] 6.17:GR.1.a.ii.1. if (result == null) result = (XMLDataValue)getNewNull(); ... |
SQLState.LANG_INVALID_XML_COLUMN_ASSIGN); | SQLState.LANG_NOT_AN_XML_DOCUMENT); | public void normalize( DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(source instanceof XMLDataValue, "Tried to store non-XML value into XML co... |
SanityManager.THROWASSERT("sourceResultSetNumber expected to be >= 0"); | SanityManager.THROWASSERT("sourceResultSetNumber expected to be >= 0 for " + getTableName() + "." + getColumnName()); | public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { int sourceResultSetNumber = source.getResultSetNumber(); //PUSHCOMPILE /* Reuse generated code, where possible */ /* ** If the source is redundant, return the generation of its source. ** M... |
public DistinctScalarAggregateResultSet(NoPutResultSet s, | DistinctScalarAggregateResultSet(NoPutResultSet s, | public DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEsti... |
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException | double optimizerEstimatedCost) throws StandardException | public DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEsti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.