rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
valLength = ((EXTDTAInputStream) val).length(); if (valLength > 0)
if( ! ((EXTDTAInputStream) val).isEmptyStream() ){
protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (...
writer.writeExtendedLength (valLength);
writer.writeExtendedLength(0x8000); }else{ writer.writeExtendedLength(0); }
protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (...
((currentCost.compare(bestCost) < 0) || (currentSortAvoidanceCost.compare(bestCost) < 0)) &&
!alreadyCostsMore &&
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...
else if (optimizerTrace)
else
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...
if (optimizerTrace) { if (joinPosition < (numOptimizables - 1)) { trace(SHORT_CIRCUITING, 0, 0, 0.0, null); } }
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...
{ trace(SHORT_CIRCUITING, 0, 0, 0.0, null); }
reloadBestPlan = true;
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...
private static String getDataSourcePrefix()
public static String getDataSourcePrefix()
private static String getDataSourcePrefix() { framework = getFramework(); switch(framework) { case OLD_NET_FRAMEWORK: case DERBY_NET_FRAMEWORK: case DB2JCC_FRAMEWORK: return "com.ibm.db2.jcc.DB2"; case DERBY_NET_CLIENT_FRAMEWORK: return "org.apache.derby.jdbc.Client"; case EMBEDDED_FRAMEW...
return "org.apache.derby.jdbc.Embed";
return "org.apache.derby.jdbc.Embedded";
private static String getDataSourcePrefix() { framework = getFramework(); switch(framework) { case OLD_NET_FRAMEWORK: case DERBY_NET_FRAMEWORK: case DB2JCC_FRAMEWORK: return "com.ibm.db2.jcc.DB2"; case DERBY_NET_CLIENT_FRAMEWORK: return "org.apache.derby.jdbc.Client"; case EMBEDDED_FRAMEW...
if (expected != null && expected.length() > 5) { expected = expected.substring(0, 5); } assertEquals(message, expected, exception.getSQLState());
String state = exception.getSQLState(); if ( state != null ) assertTrue("The exception's SQL state must be five characters long", exception.getSQLState().length() == 5); if ( expected != null ) assertTrue("The expected SQL state must be five characters long", expected.length() == 5); assertEquals(message, expected, ...
public static void assertSQLState(String message, String expected, SQLException exception) { // Make sure exception is not null. We want to separate between a // null-exception object, and a null-SQLState. if (exception...
cliParams_.clear();
cliParamDrdaTypes = null; cliParamLens = null; cliParamExtPositions = null;
protected void close() throws SQLException { if (ps != null) ps.close(); if (stmt != null) stmt.close(); rsClose(); resultSetTable = null; resultSetKeyList = null; numResultSets = 0; ps = null; stmtPmeta = null; stmt = null; scrollType = ResultSet.TYPE_FORWARD_ONLY; concurType = ResultSet.CONCUR_READ_...
{ return cliParams_.size(); }
{ if (cliParamDrdaTypes != null) return cliParamDrdaTypes.size(); else return 0; }
protected int getNumParams() { return cliParams_.size(); }
return getCliParam(index-1).drdaType;
return ((Byte)cliParamDrdaTypes.get(index -1)).intValue();
protected int getParamDRDAType(int index) { return getCliParam(index-1).drdaType; }
return getCliParam(index-1).drdaLength;
return ((Integer) cliParamLens.elementAt(index -1)).intValue();
protected int getParamLen(int index) { return getCliParam(index-1).drdaLength; }
{ getCliParam(index-1).drdaType = type; }
{ cliParamDrdaTypes.addElement(new Byte(type)); }
protected void setParamDRDAType(int index, byte type) { getCliParam(index-1).drdaType = type; }
getCliParam(index-1).drdaLength = value;
cliParamLens.add(index -1, new Integer(value));
protected void setParamLen(int index, int value) { getCliParam(index-1).drdaLength = value; }
InputStream is = new FileInputStream(f);
InputStream is = getInputStream(f);
Blob buildAndInsertBlobValue(int n,String filename,Connection conn){ int c; byte [] fromFile = new byte[1024]; Blob blob=null; try { blob = conn.createBlob(); java.io.OutputStream os = blob.setBinaryStream(1); buildFilePath(filename); File f = ...
} catch(PrivilegedActionException pae) { pae.printStackTrace();
Blob buildAndInsertBlobValue(int n,String filename,Connection conn){ int c; byte [] fromFile = new byte[1024]; Blob blob=null; try { blob = conn.createBlob(); java.io.OutputStream os = blob.setBinaryStream(1); buildFilePath(filename); File f = ...
InputStream is = new FileInputStream(f);
InputStream is = getInputStream(f);
Clob buildAndInsertClobValue(int n,String filename,Connection conn){ int c; byte [] fromFile = new byte[1024]; Clob clob=null; try { clob = conn.createClob(); java.io.OutputStream os = clob.setAsciiStream(1); buildFilePath(filename); File f = n...
} catch(PrivilegedActionException pae) { pae.printStackTrace();
Clob buildAndInsertClobValue(int n,String filename,Connection conn){ int c; byte [] fromFile = new byte[1024]; Clob clob=null; try { clob = conn.createClob(); java.io.OutputStream os = clob.setAsciiStream(1); buildFilePath(filename); File f = n...
TestPreparedStatementMethods tpsm = new TestPreparedStatementMethods(); tpsm.startClientTestMethods(); tpsm.startEmbeddedTestMethods();
try { ij.getPropertyArg(args); Connection conn_main = ij.startJBMS(); TestPreparedStatementMethods tpsm = new TestPreparedStatementMethods(); if ( usingEmbeddedClient() ) { tpsm.startEmbeddedTestMethods( conn_main ); } else { tpsm.startClientTestMethods( conn_main ); } } catch(Exception e) { printStackTrace( e );...
public static void main(String args[]) { TestPreparedStatementMethods tpsm = new TestPreparedStatementMethods(); tpsm.startClientTestMethods(); tpsm.startEmbeddedTestMethods(); }
void startClientTestMethods() { Connection conn_main = null;
void startClientTestMethods( Connection conn_main ) {
void startClientTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.ClientDriver"); conn_main = DriverManager.getConnection("jdbc:derby:" + "//loca...
Class.forName("org.apache.derby.jdbc.ClientDriver"); conn_main = DriverManager.getConnection("jdbc:derby:" + " "create=true");
void startClientTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.ClientDriver"); conn_main = DriverManager.getConnection("jdbc:derby:" + "//loca...
} catch(ClassNotFoundException cnfe) { cnfe.printStackTrace();
void startClientTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.ClientDriver"); conn_main = DriverManager.getConnection("jdbc:derby:" + "//loca...
void startEmbeddedTestMethods() { Connection conn_main = null;
void startEmbeddedTestMethods( Connection conn_main ) {
void startEmbeddedTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + ...
try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + "create=true");
try {
void startEmbeddedTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + ...
InputStream fin = new FileInputStream(file);
InputStream fin = getInputStream(file);
void startEmbeddedTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + ...
InputStream fin1 = new FileInputStream(file1);
InputStream fin1 = getInputStream(file1);
void startEmbeddedTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + ...
} catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch(FileNotFoundException fnfe) { fnfe.printStackTrace(); } catch(IOException ioe) { ioe.printStackTrace();
} catch(PrivilegedActionException pae) { pae.printStackTrace(); } catch(FileNotFoundException fne) { fne.printStackTrace();
void startEmbeddedTestMethods() { Connection conn_main = null; PreparedStatement ps_main = null; stmtIsClosed = false; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); conn_main = DriverManager.getConnection("jdbc:derby:mydb1;" + ...
if ("<NONE>".equals( BaseTestCase.getSystemProperty("java.security.policy"))) { return false; }
boolean defaultSecurityManagerSetup() throws PrivilegedActionException { // Testing with the DB2 client has not been performed // under the security manager since it's not part // of Derby so no real interest in tracking down issues. if (jdbcClient.isDB2Client()) { SecurityManagerSetup.noS...
"Required character converter not available for data type.");
new MessageId(SQLState.CHARACTER_CONVERTER_NOT_AVAILABLE));
private final String getCHAR(int column) throws SqlException { String tempString = null; if (ccsid_[column - 1] == 1200) { return getStringWithoutConvert(columnDataPosition_[column - 1], columnDataComputedLength_[column - 1]); } try { // check for null encoding is n...
throw new SqlException(agent_.logWriter_, e, "unsupported encoding for result set column " + column);
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "CHAR", "String", e);
private final String getCHAR(int column) throws SqlException { String tempString = null; if (ccsid_[column - 1] == 1200) { return getStringWithoutConvert(columnDataPosition_[column - 1], columnDataComputedLength_[column - 1]); } try { // check for null encoding is n...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to DATE");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "DATE", "java.sql.Date", e);
private final java.sql.Date getDATE(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.dateBytesToDate(dataBuffer_, columnDataPosition_[column - 1], recyclableDate_, charsetName_[column - 1]); }catch (UnsupportedE...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to DATE");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "TIMESTAMP", "java.sql.Date", e);
private final java.sql.Date getDateFromTIMESTAMP(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.timestampBytesToDate(dataBuffer_, columnDataPosition_[column - 1], recyclableDate_, charsetName_[column -1]);...
throw new SqlException(agent_.logWriter_, e, "Decimal value is out of range for conversion to double");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE), "double", e);
private final double getDoubleFromDECIMAL(int column) throws SqlException { try { return org.apache.derby.client.am.Decimal.getDouble(dataBuffer_, columnDataPosition_[column - 1], getColumnPrecision(column - 1), getColumnScale(column - 1)); ...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to BigDecimal");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "DECIMAL", "double", e);
private final double getDoubleFromDECIMAL(int column) throws SqlException { try { return org.apache.derby.client.am.Decimal.getDouble(dataBuffer_, columnDataPosition_[column - 1], getColumnPrecision(column - 1), getColumnScale(column - 1)); ...
throw new SqlException(agent_.logWriter_, e, "Decimal value is out of range for conversion to long");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE), "long", e);
private final long getLongFromDECIMAL(int column) throws SqlException { try { return org.apache.derby.client.am.Decimal.getLong(dataBuffer_, columnDataPosition_[column - 1], getColumnPrecision(column - 1), getColumnScale(column - 1)); ...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to BigDecimal");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "DECIMAL", "long", e);
private final long getLongFromDECIMAL(int column) throws SqlException { try { return org.apache.derby.client.am.Decimal.getLong(dataBuffer_, columnDataPosition_[column - 1], getColumnPrecision(column - 1), getColumnScale(column - 1)); ...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to TIME");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "TIME", "java.sql.Time", e);
private final java.sql.Time getTIME(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.timeBytesToTime(dataBuffer_, columnDataPosition_[column - 1], recyclableTime_, charsetName_[column - 1]); } catch (...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to TIMESTAMP");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "TIMESTAMP", "java.sql.Timestamp", e);
private final java.sql.Timestamp getTIMESTAMP(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.timestampBytesToTimestamp( dataBuffer_, columnDataPosition_[column - 1], recyclableTimestamp_, charsetName_[colu...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to TIME");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "TIMESTAMP", "java.sql.Time", e);
private final java.sql.Time getTimeFromTIMESTAMP(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.timestampBytesToTime(dataBuffer_, columnDataPosition_[column - 1], recyclableTime_, charsetName_[column -1]);...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to TIMESTAMP");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "DATE", "java.sql.Timestamp", e);
private final java.sql.Timestamp getTimestampFromDATE(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.dateBytesToTimestamp(dataBuffer_, columnDataPosition_[column - 1], recyclableTimestamp_, charsetName_[c...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to TIMESTAMP");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "TIME", "java.sql.Timestamp", e);
private final java.sql.Timestamp getTimestampFromTIME(int column) throws SqlException { try { return org.apache.derby.client.am.DateTime.timeBytesToTimestamp(dataBuffer_, columnDataPosition_[column - 1], recyclableTimestamp_, charsetName_[co...
"Required character converter not available for data type.");
new MessageId(SQLState.CHARACTER_CONVERTER_NOT_AVAILABLE));
private final String getVARCHAR(int column) throws SqlException { String tempString = null; try { if (ccsid_[column - 1] == 1200) { return getStringWithoutConvert(columnDataPosition_[column - 1] + 2, columnDataComputedLength_[column - 1] - 2); } // check...
throw new SqlException(agent_.logWriter_, e, "unsupported encoding for result set column " + column);
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "VARCHAR", "String", e);
private final String getVARCHAR(int column) throws SqlException { String tempString = null; try { if (ccsid_[column - 1] == 1200) { return getStringWithoutConvert(columnDataPosition_[column - 1] + 2, columnDataComputedLength_[column - 1] - 2); } // check...
throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to BigDecimal");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "DECIMAL", "java.math.BigDecimal", e);
private final java.math.BigDecimal get_DECIMAL(int column) throws SqlException { try { return org.apache.derby.client.am.Decimal.getBigDecimal(dataBuffer_, columnDataPosition_[column - 1], getColumnPrecision(column - 1), getColumnScale(colum...
double optimizerEstimatedCost, GeneratedMethod c
double optimizerEstimatedCost
GenericAggregateResultSet ( NoPutResultSet s, int aggregateItem, Activation a, GeneratedMethod ra, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c ) throws StandardException { super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerE...
closeCleanup = c;
GenericAggregateResultSet ( NoPutResultSet s, int aggregateItem, Activation a, GeneratedMethod ra, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c ) throws StandardException { super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerE...
sqlerrmc += SQLERRMC_MESSAGE_DELIMITER + se.getSQLState() + ":";
sqlerrmc += SystemProcedures.SQLERRMC_MESSAGE_DELIMITER + se.getSQLState() + ":";
private String buildTokenizedSqlerrmc(EmbedSQLException se) { String sqlerrmc = ""; do { String messageId = se.getMessageId(); // arguments are variable part of a message Object[] args = se.getArguments(); for (int i = 0; args != null && i < args.length; i++) sqlerrmc += args[i] + SQLERRMC_TOKEN_DELIMI...
trace("fix bytes parameter value is: "+new String(paramVal));
trace("fix bytes parameter value is: "+ convertToHexString(paramVal));
private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicat...
byte[] sep = {20}; String separator = new String(sep);
private void writeSQLDIAGCI(SQLException nextException) throws DRDAProtocolException { SQLException se = nextException; long rowNum = 1; /* Write the number of next exceptions to expect */ writeSQLNUMROW(se); while (se != null) { String sqlState = se.getSQLState(); int sqlCode = getSqlCode(getExceptionSever...
sqlerrmc += args[i].toString() + separator;
sqlerrmc += args[i].toString() + SQLERRMC_TOKEN_DELIMITER;
private void writeSQLDIAGCI(SQLException nextException) throws DRDAProtocolException { SQLException se = nextException; long rowNum = 1; /* Write the number of next exceptions to expect */ writeSQLNUMROW(se); while (se != null) { String sqlState = se.getSQLState(); int sqlCode = getSqlCode(getExceptionSever...
stmt.execute("create table testtable1 (id integer, vc varchar(100))"); stmt.execute("insert into testtable1 values (11, 'testtable1-one'), (12, 'testtable1-two')"); stmt.execute("create table testtable2 (id integer, vc varchar(100))"); stmt.execute("insert into testtable2 values (21, 'testtable2-one'), (22, 'testtable2...
private static void createAndPopulateTable(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); System.out.println("Creating table..."); stmt.executeUpdate( "CREATE TABLE T1 (c11 int, c12 int)" ); stmt.executeUpdate("INSERT INTO T1 VALUES(1,1)"); stmt.executeUpdate("INSERT IN...
testHoldability(conn,ResultSet.HOLD_CURSORS_OVER_COMMIT); testHoldability(conn,ResultSet.CLOSE_CURSORS_AT_COMMIT);
public static void main (String args[]) { try { /* Load the JDBC Driver class */ // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Connection conn = ij.startJBMS(); createAndPopulateTable(conn); //set autocommit to off after creating table and in...
project.clear();
public void doTag(XMLOutput output) throws Exception { project.clear(); context.setVariable( "org.apache.commons.jelly.werkz.Project", project ); getBody().run(context, output); }
(purgeRows == 1), (defragementRows == 1), (truncateEnd == 1));
(purgeRows != 0), (defragementRows != 0), (truncateEnd != 0));
public static void SYSCS_INPLACE_COMPRESS_TABLE( String schema, String tablename, int purgeRows, int defragementRows, int truncateEnd) throws SQLException { org.apache.derby.iapi.db.OnlineCompress.compressTable( schema, tablename, (purgeRows...
String schemaName = objectName.getSchemaName(); boolean needError = !implicitCreateSchema; SchemaDescriptor sd = getSchemaDescriptor(schemaName, needError); if (sd == null) { if (schemaName.startsWith("SYS")) throw StandardException.newException(SQLState.LANG_NO_USER_DDL_IN_SYSTEM_SCHEMA, statementToString(), schema...
return getSchemaDescriptor(true);
protected final SchemaDescriptor getSchemaDescriptor() throws StandardException { String schemaName = objectName.getSchemaName(); //boolean needError = !(implicitCreateSchema || (schemaName == null)); boolean needError = !implicitCreateSchema; SchemaDescriptor sd = getSchemaDescriptor(schemaName, needError); if (...
if (re.isParameterNode())
if (re.requiresTypeFromContext())
void setTableConstructorTypes(ResultColumnList typeColumns) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns.size() <= typeColumns.size(), "More columns in ResultColumnList than in base table"); /* Look for ? parameters in the result column list */ int rclSize = resultCo...
((ParameterNode) re).setDescriptor( typeCol.getTypeServices());
re.setType(typeCol.getTypeServices());
void setTableConstructorTypes(ResultColumnList typeColumns) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns.size() <= typeColumns.size(), "More columns in ResultColumnList than in base table"); /* Look for ? parameters in the result column list */ int rclSize = resultCo...
execCmdDumpResults(timesliceCmd6);
public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); try { Connection conn1 = ij.st...
df.removeDroppedContainerFileStubs(redoLWM);
if(!backupInProgress) df.removeDroppedContainerFileStubs(redoLWM);
protected boolean checkpointWithTran(RawTransaction cptran, RawStoreFactory rsf, DataFactory df, TransactionFactory tf) throws StandardException { boolean proceed = true; LogInstant redoLWM; // we may be called to stop the database after a bad error, make sure // logout is set if (lo...
public void setDatabaseEncrypted();
public void setDatabaseEncrypted(boolean flushLog) throws StandardException;
public void setDatabaseEncrypted();
super.markResultSetsClosed();
super.markResultSetsClosed(true);
void flowExecute(int executeType) throws SqlException { super.checkForClosedStatement(); super.clearWarningsX(); super.checkForAppropriateSqlMode(executeType, sqlMode_); checkThatAllParametersAreSet(); if (sqlMode_ == isUpdate__) { updateCount_ = 0; } else { ...
jira1454Test(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; } Statement cleanstmt = conn.createStatement(); TestUtil.cleanUpTest(cleanstmt, testO...
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles)
public void backupAndEnableLogArchiveMode( String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait)
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException;
if (dupNameCheck[dnc].equals(dupNameCheck[dnc - 1]))
if (! dupNameCheck[dnc].equals("") && dupNameCheck[dnc].equals(dupNameCheck[dnc - 1]))
public void init( Object aliasName, Object targetObject, Object methodName, Object aliasSpecificInfo, Object aliasType, Object delimitedIdentifier) throws StandardException { TableName qn = (TableName) aliasName; this.aliasType = ((Character) aliasType).charValue(); initAndCheck(qn)...
checkEmptyRS(met.getFunctions(null,null,null));
s.execute("CREATE FUNCTION DUMMY1 ( X SMALLINT ) RETURNS SMALLINT "+ "PARAMETER STYLE JAVA NO SQL LANGUAGE JAVA EXTERNAL "+ "NAME 'java.some.func'"); s.execute("CREATE FUNCTION DUMMY2 ( X INTEGER, Y SMALLINT ) RETURNS"+ " INTEGER PARAMETER STYLE JAVA NO SQL LANGUAGE JAVA "+ "EXTERNAL NAME 'java.some.func'"); s.execute(...
public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; try { // Using this for now instead of ij because ij.startJBMS() // returns null for classes built against JDK 1.6 con = new TestConnection().createEmbeddedConnection(); con.setAutoC...
dumpRS(met.getFunctions(null, null, null)); dumpRS(met.getFunctions("Dummy Catalog", null, null)); dumpRS(met.getFunctions(null, "SYS%", null)); dumpRS(met.getFunctions(null, null, "%GET%")); checkEmptyRS(met.getFunctions("", "", null));
public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; try { // Using this for now instead of ij because ij.startJBMS() // returns null for classes built against JDK 1.6 con = new TestConnection().createEmbeddedConnection(); con.setAutoC...
t_createNClob(); t_createSQLXML();
public void startTestConnectionMethods_Client() { t_createClob_Client(); t_createBlob_Client(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); }
t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper();
public void startTestConnectionMethods_Client() { t_createClob_Client(); t_createBlob_Client(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); }
t_createClob(); t_createBlob(); t_createNClob(); t_createSQLXML();
public void startTestConnectionMethods_Embedded() { t_createClob(); t_createBlob(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); }
t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper();
public void startTestConnectionMethods_Embedded() { t_createClob(); t_createBlob(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); t_wrapper(); }
} RowIdLifetime lifetime = met.getRowIdLifetime(); if (lifetime != RowIdLifetime.ROWID_UNSUPPORTED) { System.out.println("FAIL: getRowIdLifetime() should return " + "ROWID_UNSUPPORTED, but got " + lifetime);
private static void testDatabaseMetaDataMethods(Connection con) throws Exception { con.setAutoCommit(true); // make sure it is true Statement s = con.createStatement(); DatabaseMetaData met = con.getMetaData(); if (!met.supportsStoredFunctionsUsingCallSyntax()) { Sys...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "java.math.BigDecimal.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "java.math.BigDecimal", e);
final java.math.BigDecimal getBigDecimalFromString(String source) throws SqlException { try { // Unfortunately, the big decimal constructor calls java.lang.Long.parseLong(), // which doesn't like spaces, so we have to call trim() to get rid of the spaces from CHAR columns. re...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "byte.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "byte", e);
final byte getByteFromString(String source) throws SqlException { try { return parseByte(source); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "java.sql.Date.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_DATE_SYNTAX_EXCEPTION), e);
final java.sql.Date getDateFromString(String source) throws SqlException { try { return date_valueOf(source); } catch (java.lang.IllegalArgumentException e) { // subsumes NumberFormatException throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "double.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "double", e);
final double getDoubleFromString(String source) throws SqlException { try { return Double.parseDouble(source.trim()); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "float.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "float", e);
final float getFloatFromString(String source) throws SqlException { try { return Float.parseFloat(source.trim()); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + so...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "int.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "int", e);
final int getIntFromString(String source) throws SqlException { try { return parseInt(source); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "long.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "long", e);
final long getLongFromString(String source) throws SqlException { try { return parseLong(source); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "short.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_FORMAT_EXCEPTION), "short", e);
final short getShortFromString(String source) throws SqlException { try { return parseShort(source); } catch (java.lang.NumberFormatException e) { throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "java.sql.Time.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_DATE_SYNTAX_EXCEPTION), e);
final java.sql.Time getTimeFromString(String source) throws SqlException { try { return time_valueOf(source); } catch (java.lang.IllegalArgumentException e) { // subsumes NumberFormatException throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + ...
throw new SqlException(agent_.logWriter_, e, "Invalid data conversion:" + " Parameter instance " + source + " is invalid for requested conversion to " + "java.sql.Timestamp.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_DATE_SYNTAX_EXCEPTION), e);
final java.sql.Timestamp getTimestampFromString(String source) throws SqlException { try { return timestamp_valueOf(source); } catch (java.lang.IllegalArgumentException e) { // subsumes NumberFormatException throw new SqlException(agent_.logWriter_, e, "Invali...
throw new ColumnTypeConversionException(agent_.logWriter_);
throw new ColumnTypeConversionException(agent_.logWriter_, Types.getTypeString(sourceType), "boolean");
final boolean setBooleanFromObject(Object source, int sourceType) throws SqlException { switch (sourceType) { case Types.SMALLINT: return getBooleanFromShort(((Short) source).shortValue()); case Types.INTEGER: return getBooleanFromInt(((Integer) source).intValue()); ...
throw new ColumnTypeConversionException(agent_.logWriter_);
throw new ColumnTypeConversionException(agent_.logWriter_, Types.getTypeString(sourceType), "byte");
final byte setByteFromObject(Object source, int sourceType) throws SqlException { switch (sourceType) { case Types.SMALLINT: return getByteFromShort(((Short) source).shortValue()); case Types.INTEGER: return getByteFromInt(((Integer) source).intValue()); case Types....
throw new SqlException(agent_.logWriter_, "The InputStream object does not contain length bytes");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.READER_UNDER_RUN));
private final byte[] setBytesFromStream(java.io.InputStream is, int length) throws SqlException { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); int totalRead = 0; try { int read = is.read(); while (read != -1) { totalRead++; ...
throw new SqlException(agent_.logWriter_, e.getMessage());
throw new SqlException(agent_.logWriter_, e, null);
private final byte[] setBytesFromStream(java.io.InputStream is, int length) throws SqlException { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); int totalRead = 0; try { int read = is.read(); while (read != -1) { totalRead++; ...
throw new SqlException(agent_.logWriter_, "Illegal Conversion");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_DATA_TYPE_SET_MISMATCH), "java.io.InputStream", Types.getTypeString(targetType));
final Object setObjectFromBinaryStream(int targetType, java.io.InputStream source, int length) throws SqlException { switch (targetType) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: return setBytesFromStream(source, length); case Types.BLOB: ...
throw new SqlException(agent_.logWriter_, "Illegal Conversion");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.LANG_DATA_TYPE_SET_MISMATCH), "java.io.InputStream", Types.getTypeString(targetType));
final Object setObjectFromCharacterStream(int targetType, java.io.InputStream source, String encoding, int length) throws SqlException { switch (targetType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: return setStringFromStream(source, encoding, length); ...
throw new SqlException(agent_.logWriter_, "The Reader object does not contain length characters");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.READER_UNDER_RUN));
private final String setStringFromReader(java.io.Reader r, int length) throws SqlException { java.io.StringWriter sw = new java.io.StringWriter(); try { int read = r.read(); int totalRead = 0; while (read != -1) { totalRead++; sw.write(rea...
throw new SqlException(agent_.logWriter_, e.getMessage());
throw SqlException.javaException(agent_.logWriter_, e);
private final String setStringFromReader(java.io.Reader r, int length) throws SqlException { java.io.StringWriter sw = new java.io.StringWriter(); try { int read = r.read(); int totalRead = 0; while (read != -1) { totalRead++; sw.write(rea...
throw new SqlException(agent_.logWriter_, e.getMessage());
throw new SqlException(agent_.logWriter_, e, null);
private final String setStringFromStream(java.io.InputStream is, String encoding, int length) throws SqlException { try { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); int totalRead = 0; try { int read = is.read(); whi...
throw new SqlException(agent_.logWriter_, "The InputStream object does not contain length bytes");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.READER_UNDER_RUN));
private final String setStringFromStream(java.io.InputStream is, String encoding, int length) throws SqlException { try { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); int totalRead = 0; try { int read = is.read(); whi...
throw new SqlException(agent_.logWriter_, e.getMessage());
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "java.io.InputStream", "String", e);
private final String setStringFromStream(java.io.InputStream is, String encoding, int length) throws SqlException { try { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); int totalRead = 0; try { int read = is.read(); whi...
this.timeoutMillis = stmt == null ? 0L : (long)stmt.getQueryTimeout() * 1000L;
public EmbedResultSet(EmbedConnection conn, ResultSet resultsToWrap, boolean forMetaData, EmbedStatement stmt, boolean isAtomic) throws SQLException { super(conn); if (SanityManager.DEBUG) SanityManager.ASSERT(resultsToWrap!=null); theResults = resultsToWrap; this.forMetaData = forMetaData; this.stmt = o...
StatementContext statementContext = lcc .pushStatementContext(isAtomic, getSQLText(), getParameterValueSet(), false);
StatementContext statementContext = lcc.pushStatementContext(isAtomic, getSQLText(), getParameterValueSet(), false, 0L);
private boolean checkRowPosition(int position, String positionText) throws SQLException { // beforeFirst is only allowed on scroll cursors checkScrollCursor(positionText); checkIfClosed(positionText); // checking result set closure does not // depend // on the underlying connection. Do this // outside ...
StatementContext statementContext = lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null, false);
StatementContext statementContext = lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); setupContextStack(); //now construct the delete where current of sql try { StringBuffer deleteWhereCurrentOfSQL...
ps.setQueryTimeout(0L);
public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); setupContextStack(); //now construct the delete where current of sql try { StringBuffer deleteWhereCurrentOfSQL...
statementContext = lcc.pushStatementContext(isAtomic, updateWhereCurrentOfSQL.toString(), null, false);
statementContext = lcc.pushStatementContext(isAtomic, updateWhereCurrentOfSQL.toString(), null, false, 0L);
public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); setupContextStack(); LanguageConnectionContext lcc = null; StatementContext statementContext = null; try { if (currentRowHasBeenU...
ps.setQueryTimeout(0L);
public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); setupContextStack(); LanguageConnectionContext lcc = null; StatementContext statementContext = null; try { if (currentRowHasBeenU...
String info = LocalizedResource.getMessage("IJ_01SeeClouLog", t.toString(), t.getMessage());
String info = LocalizedResource.getMessage("IJ_01SeeLog", t.toString(), t.getMessage());
private void handleException(Throwable t) throws SQLException { if (t instanceof SQLException) { // let ij handle it throw (SQLException)t; } if (t instanceof XAException) { int errorCode = ((XAException)t).errorCode; String error = LocalizedResource.getMessage("IJ_IlleValu"); // XA_RBBASE 100 // XA_R...