rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public UpgradeTester(String oldJarLoc, String newJarLoc, int oldMajorVersion, int oldMinorVersion,
public UpgradeTester(int oldMajorVersion, int oldMinorVersion,
public UpgradeTester(String oldJarLoc, String newJarLoc, int oldMajorVersion, int oldMinorVersion, int newMajorVersion, int newMinorVersion, boolean allowPreReleaseUpgrade) { this.oldJarLoc = oldJarLoc; this.newJarLoc = newJarLoc; this.oldMajorVersion = oldMajorVersion; this.oldMinorVersion = oldMi...
this.oldJarLoc = oldJarLoc; this.newJarLoc = newJarLoc;
public UpgradeTester(String oldJarLoc, String newJarLoc, int oldMajorVersion, int oldMinorVersion, int newMajorVersion, int newMinorVersion, boolean allowPreReleaseUpgrade) { this.oldJarLoc = oldJarLoc; this.newJarLoc = newJarLoc; this.oldMajorVersion = oldMajorVersion; this.oldMinorVersion = oldMi...
Class testUtilClass = Class.forName("org.apache.derbyTesting.functionTests.util.TestUtil", true, classLoader); Object testUtilObject = testUtilClass.newInstance();
try { Class testUtilClass = Class.forName("org.apache.derbyTesting.functionTests.util.TestUtil", true, classLoader); Object testUtilObject = testUtilClass.newInstance();
private Connection getConnectionUsingDataSource(URLClassLoader classLoader, Properties prop) throws Exception{ Connection conn = null; Class testUtilClass = Class.forName("org.apache.derbyTesting.functionTests.util.TestUtil", true, classLoader); Object testUtilObject = testUtilClass.newInstance(); /...
} catch(SQLException sqle) { throw sqle; } catch (Exception e) { handleReflectionExceptions(e); throw e; }
private Connection getConnectionUsingDataSource(URLClassLoader classLoader, Properties prop) throws Exception{ Connection conn = null; Class testUtilClass = Class.forName("org.apache.derbyTesting.functionTests.util.TestUtil", true, classLoader); Object testUtilObject = testUtilClass.newInstance(); /...
if(args.length != 6) { System.out.println("USAGE: java UpgradeTester <location of old jars> <location of new jars> <old major version> <old minor version> <new major version> <new minor version>"); System.out.println("e.g: java UpgradeTester C:\\derby\\10.1\\lib C:\\derby\\trunk\\lib 10 1 10 2");
if(args.length != 4) { System.out.println("USAGE: java UpgradeTester <old major version> <old minor version> <new major version> <new minor version>"); System.out.println("e.g: java UpgradeTester 10 1 10 2");
public static void main(String[] args) { if(args.length != 6) { System.out.println("USAGE: java UpgradeTester <location of old jars> <location of new jars> <old major version> <old minor version> <new major version> <new minor version>"); System.out.println("e.g: java UpgradeTester C:\\derby\\10.1\\lib C:\\derb...
String oldJarLoc = args[0]; String newJarLoc = args[1];
public static void main(String[] args) { if(args.length != 6) { System.out.println("USAGE: java UpgradeTester <location of old jars> <location of new jars> <old major version> <old minor version> <new major version> <new minor version>"); System.out.println("e.g: java UpgradeTester C:\\derby\\10.1\\lib C:\\derb...
UpgradeTester upgradeTester = new UpgradeTester(oldJarLoc, newJarLoc, oldMajorVersion, oldMinorVersion, newMajorVersion, newMinorVersion, allowPreReleaseUpgrade);
UpgradeTester upgradeTester = new UpgradeTester(oldMajorVersion, oldMinorVersion, newMajorVersion, newMinorVersion, allowPreReleaseUpgrade);
public static void main(String[] args) { if(args.length != 6) { System.out.println("USAGE: java UpgradeTester <location of old jars> <location of new jars> <old major version> <old minor version> <new major version> <new minor version>"); System.out.println("e.g: java UpgradeTester C:\\derby\\10.1\\lib C:\\derb...
Statement stmt = conn.createStatement(); Class metadataClass = Class.forName("org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata",
try { Statement stmt = conn.createStatement(); Class metadataClass = Class.forName("org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata",
private void runMetadataTest(URLClassLoader classLoader, Connection conn) throws Exception{ Statement stmt = conn.createStatement(); Class metadataClass = Class.forName("org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata", true, classLoader); Object metadataObject = metadataCl...
Object metadataObject = metadataClass.newInstance(); java.lang.reflect.Field f1 = metadataClass.getField("con"); f1.set(metadataObject, conn); java.lang.reflect.Field f2 = metadataClass.getField("s"); f2.set(metadataObject, stmt); java.lang.reflect.Method method = metadataClass.getMethod("runTest", null); method.invoke...
Object metadataObject = metadataClass.newInstance(); java.lang.reflect.Field f1 = metadataClass.getField("con"); f1.set(metadataObject, conn); java.lang.reflect.Field f2 = metadataClass.getField("s"); f2.set(metadataObject, stmt); java.lang.reflect.Method method = metadataClass.getMethod("runTest", null); method.invoke...
private void runMetadataTest(URLClassLoader classLoader, Connection conn) throws Exception{ Statement stmt = conn.createStatement(); Class metadataClass = Class.forName("org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata", true, classLoader); Object metadataObject = metadataCl...
try { conn = getConnection(classLoader, dbName, phase); } catch (SQLException sqle) { }
conn = getConnection(classLoader, dbName, phase);
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ...
setJarLocations();
public void runUpgradeTests() throws Exception{ // Set the system property to allow alpha/beta release // upgrade as specified if(allowPreReleaseUpgrade) System.setProperty("derby.database.allowPreReleaseUpgrade", "true"); else System.setProperty("derby.database.allowPreReleaseUpgrade", "fal...
logicalConnection_ = new org.apache.derby.client.am.LogicalConnection(physicalConnection_, this);
logicalConnection_ = ClientDriver.getFactory().newLogicalConnection( physicalConnection_, this);
private void createLogicalConnection() throws SqlException { if (physicalConnection_ == null) { throw new SqlException(logWriter_, new ClientMessageId(SQLState.NOGETCONN_ON_CLOSED_POOLED_CONNECTION)); } // Not the usual case, but if we have an existing logical connecti...
xaResource = xaConnection.getXAResource();
setXAResource(xaConnection.getXAResource());
protected synchronized Connection makeConnection(Properties p) throws SQLException { if (xaDataSource == null) { xaDataSource = new EmbeddedXADataSource(); } xaDataSource.setDatabaseName(shortDbName); appendAttrString(p); if (attrString != null) xaDataSource.setConnectionAttributes(attrString); Connection...
this.targetTableName = synonymTab;
{ this.synonymTableName = targetTableName; this.targetTableName = synonymTab; }
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 (synonymTableName != null) normalizeSynonymColumns( resultSet.resultColumns, targetTable );
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(), ...
xType = -1;
public XML() { xmlStringValue = null; }
return new SQLBoolean(sqlxUtil.evalXQExpression(this));
return new SQLBoolean(null != sqlxUtil.evalXQExpression(this, false, new int[1]));
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 ...
setXType(XML_DOC_ANY);
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...
return new XML(xmlStringValue);
return new XML(xmlStringValue, getXType());
public DataValueDescriptor getClone() { return new XML(xmlStringValue); }
setXType(XML_DOC_ANY);
public void readExternal(ObjectInput in) throws IOException { if (xmlStringValue == null) xmlStringValue = new SQLChar(); // Read the XML implementation id. Right now there's // only one implementation (UTF-8 based), so we don't // use this value. But if better implementa...
setXType(XML_DOC_ANY);
public void readExternalFromArray(ArrayInputStream in) throws IOException { if (xmlStringValue == null) xmlStringValue = new SQLChar(); // Read the XML implementation id. Right now there's // only one implementation (UTF-8 based), so we don't // use this value. But...
xmlStringValue.setValue(theValue.getString());
xmlStringValue.setValue(strVal); if (theValue instanceof XMLDataValue) setXType(((XMLDataValue)theValue).getXType());
protected void setFrom(DataValueDescriptor theValue) throws StandardException { if (xmlStringValue == null) xmlStringValue = new SQLChar(); xmlStringValue.setValue(theValue.getString()); }
setXType(XML_DOC_ANY);
public void setStream(InputStream newStream) { if (xmlStringValue == null) xmlStringValue = new SQLChar(); // The stream that we receive is for an XML data value, // which means it has an XML implementation id stored // at the front (we put it there when we wrote it out). ...
} catch (Throwable ith) { ith.printStackTrace();
} catch(SQLException sqle) { if (sqle.getSQLState() != null && sqle.getSQLState().equals("XJ015")) { System.out.println("Database shutdown completed"); } else { throw sqle; }
public static void main(String[] argv) throws Throwable { try { ij.getPropertyArg(argv); Connection conn = ij.startJBMS(); conn.setAutoCommit(true); // After recovery table should contain two records with // values 0 and 1 Sta...
public UpdatableVTITemplate() {}
protected UpdatableVTITemplate() {}
public UpdatableVTITemplate() {}
public dataSourcePermissions_net( SwitchablePrintStream consoleLogStream, PrintStream originalStream, FileOutputStream shutdownLogStream, SwitchablePrintStream consoleErrLogStream, PrintStream originalErrStream, FileOutputStream shutdownErrLogStream ) { consoleLogStream_ = consoleLogStream; originalStream_ = originalS...
public dataSourcePermissions_net() {
public dataSourcePermissions_net( SwitchablePrintStream consoleLogStream, PrintStream originalStream, FileOutputStream shutdownLogStream, SwitchablePrintStream consoleErrLogStream, PrintStream originalErrStream, FileOutputStream shutdownErrLogStream ) { consoleLogStream_ = conso...
consoleErrLogStream_ = consoleErrLogStream; originalErrStream_ = originalErrStream; shutdownErrLogStream_ = shutdownErrLogStream;
public dataSourcePermissions_net( SwitchablePrintStream consoleLogStream, PrintStream originalStream, FileOutputStream shutdownLogStream, SwitchablePrintStream consoleErrLogStream, PrintStream originalErrStream, FileOutputStream shutdownErrLogStream ) { consoleLogStream_ = conso...
PrintStream originalStream = System.out; FileOutputStream shutdownLogStream = new FileOutputStream("dataSourcePermissions_net." + System.getProperty("framework","") + "." + "shutdown.std.log"); SwitchablePrintStream consoleLogStream = new SwitchablePrintStream( originalStream );
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 ...
PrintStream originalErrStream = System.err; FileOutputStream shutdownErrLogStream = new FileOutputStream("dataSourcePermissions_net." + System.getProperty("framework","") + "." + "shutdown.err.log"); SwitchablePrintStream consoleErrLogStream = new SwitchablePrintStream( originalErrStream ); System.setOut( consoleLogSt...
String fileName = System.getProperty( "derby.system.home", "") + "serverConsoleOutput.log"; serverOutput = new FileOutputStream(fileName);
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 ...
networkServer.start(null);
networkServer.start(new PrintWriter(serverOutput));
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 ...
new dataSourcePermissions_net( consoleLogStream , originalStream , shutdownLogStream , consoleErrLogStream , originalErrStream, shutdownErrLogStream);
new dataSourcePermissions_net();
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 ...
new dataSourcePermissions_net( consoleLogStream , originalStream , shutdownLogStream , consoleErrLogStream , originalErrStream , shutdownErrLogStream ).cleanUp();
new dataSourcePermissions_net().cleanUp();
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 ...
consoleLogStream.switchOutput( shutdownLogStream ); consoleErrLogStream.switchOutput( shutdownErrLogStream );
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 ...
consoleLogStream.flush(); consoleLogStream.switchOutput( originalStream ); consoleErrLogStream.switchOutput( originalErrStream );
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 ...
originalStream.close(); shutdownLogStream.close(); originalErrStream.close(); shutdownErrLogStream.close();
serverOutput.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 ...
try{
public void shutdown() { try{ try { consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ ); DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", ...
consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ );
public void shutdown() { try{ try { consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ ); DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", ...
consoleLogStream_.switchOutput( originalStream_ ); consoleErrLogStream_.switchOutput( originalErrStream_);
public void shutdown() { try{ try { consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ ); DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", ...
} catch (IOException ioe){ originalStream_.println("Switching stream was failed. Could not complete test ... "); }
public void shutdown() { try{ try { consoleLogStream_.switchOutput( shutdownLogStream_ ); consoleErrLogStream_.switchOutput( shutdownErrLogStream_ ); DriverManager.getConnection(TestUtil.getJdbcUrlPrefix(hostName, NETWORKSERVER_PORT) + "wombat;shutdown=true", ...
execCmdDumpResults(timesliceCmd1);
ExecProcUtil.execCmdDumpResults(timesliceCmd1,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
execCmdDumpResults(timesliceCmd2);
ExecProcUtil.execCmdDumpResults(timesliceCmd2,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
execCmdDumpResults(timesliceCmd3);
ExecProcUtil.execCmdDumpResults(timesliceCmd3,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
execCmdDumpResults(timesliceCmd4);
ExecProcUtil.execCmdDumpResults(timesliceCmd4,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
execCmdDumpResults(timesliceCmd5);
ExecProcUtil.execCmdDumpResults(timesliceCmd5,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
execCmdDumpResults(timesliceCmd6);
ExecProcUtil.execCmdDumpResults(timesliceCmd6,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); timesliceCmd2[4] = host; 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 ...
if(usingEmbeddedClient()) t_wrapper(met);
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...
int isolationLevel
int isolationLevel, int maxMemoryPerTable
public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca...
storeViewTriggerDependenciesOnPrivileges(activation, triggerd);
public void executeConstantAction(Activation activation) throws StandardException { SPSDescriptor whenspsd = null; SPSDescriptor actionspsd; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); DependencyManager dm = dd.getDependencyMan...
if (((EmbedSQLException)sqle).getMessageId() != SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN)
String expectedState = StandardException.getSQLStateFromIdentifier( SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN); if (!expectedState.equals(sqle.getSQLState())) {
public void blockingStart(PrintWriter consoleWriter) throws Exception { startNetworkServer(); setLogWriter(consoleWriter); cloudscapeLogWriter = Monitor.getStream().getPrintWriter(); if (SanityManager.DEBUG && debugOutput) { memCheck.showmem(); mc = new memCheck(200000); mc.start(); } // Open a ser...
}
public void blockingStart(PrintWriter consoleWriter) throws Exception { startNetworkServer(); setLogWriter(consoleWriter); cloudscapeLogWriter = Monitor.getStream().getPrintWriter(); if (SanityManager.DEBUG && debugOutput) { memCheck.showmem(); mc = new memCheck(200000); mc.start(); } // Open a ser...
if (currentSession != null && currentSession.langUtil != null)
if (currentSession != null && currentSession.langUtil != null && se instanceof EmbedSQLException)
private void sendSQLMessage(DDMWriter writer, SQLException se, int type) throws Exception { StringBuffer locMsg = new StringBuffer(); //localize message if necessary while (se != null) { if (currentSession != null && currentSession.langUtil != null) { locMsg.append(se.getSQLState()+":"+ MessageService...
if (!(((EmbedSQLException)se).getMessageId() == SQLState.SHUTDOWN_DATABASE))
String expectedState = StandardException. getSQLStateFromIdentifier(SQLState.SHUTDOWN_DATABASE); if (!expectedState.equals(se.getSQLState()))
private void shutdownDatabase(DDMWriter writer, String database, String user, String password) throws Exception { StringBuffer url = new StringBuffer(Attribute.PROTOCOL + database); if (user != null) url.append(";user="+user); if (password != null) url.append(";password="+password); url.append(";shutdown=tru...
(String)null,
private BulkTableScanResultSet getTableScanResultSet ( long conglomId ) throws StandardException { if (tableScan == null) { tableScan = new BulkTableScanResultSet( conglomId, tc.getStaticCompiledConglomInfo(conglomId), activation, new MyRowAllocator(fullTemplate), // result row allocator ...
public final void setConnectionAttributes(String prop) {
public final void setConnectionAttributes(String prop) throws SQLException {
public final void setConnectionAttributes(String prop) { connectionAttributes = prop; }
try { updateDataSourceValues(tokenizeAttributes(prop, null)); } catch(SqlException se) { throw se.getSQLException(); }
public final void setConnectionAttributes(String prop) { connectionAttributes = prop; }
void updateDataSourceValues(Properties prop) {
void updateDataSourceValues(Properties prop) throws SqlException {
void updateDataSourceValues(Properties prop) { if (prop == null) { return; } if (prop.containsKey(Attribute.USERNAME_ATTR)) { setUser(getUser(prop)); } if (prop.containsKey(Attribute.CLIENT_SECURITY_MECHANISM)) { setSecurityMechanism(getSec...
} if (prop.containsKey(Attribute.DBNAME_ATTR)) { throw new SqlException(null, new ClientMessageId(SQLState.ATTRIBUTE_NOT_ALLOWED), Attribute.DBNAME_ATTR);
void updateDataSourceValues(Properties prop) { if (prop == null) { return; } if (prop.containsKey(Attribute.USERNAME_ATTR)) { setUser(getUser(prop)); } if (prop.containsKey(Attribute.CLIENT_SECURITY_MECHANISM)) { setSecurityMechanism(getSec...
throw Util.notImplemented();
if( map == null) throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,map,"map", "java.sql.ResultSet.getObject"); if(!(map.isEmpty())) throw Util.notImplemented(); return getObject(columnIndex);
public Object getObject(int columnIndex, java.util.Map map) throws SQLException { throw Util.notImplemented(); }
super.checkExecuteQueryPostConditions("java.sql.PreparedStatement");
ResultSet executeQueryX() throws SqlException { flowExecute(executeQueryMethod__); super.checkExecuteQueryPostConditions("java.sql.PreparedStatement"); return resultSet_; }
checkExecuteUpdatePostConditions("java.sql.PreparedStatement");
private int executeUpdateX() throws SqlException { flowExecute(executeUpdateMethod__); checkExecuteUpdatePostConditions("java.sql.PreparedStatement"); return updateCount_; }
private boolean executeX() throws SqlException {
boolean executeX() throws SqlException {
private boolean executeX() throws SqlException { flowExecute(executeMethod__); return resultSet_ != null; }
checkForStoredProcResultSetCount(executeType);
void flowExecute(int executeType) throws SqlException { super.checkForClosedStatement(); super.clearWarningsX(); super.checkForAppropriateSqlMode(executeType, sqlMode_); checkThatAllParametersAreSet(); if (sqlMode_ == isUpdate__) { updateCount_ = 0; } else { ...
registerTag("mapMessage", MapMessageTag.class);
public JMSTagLibrary() { registerTag("connection", ConnectionTag.class); registerTag("destination", DestinationTag.class); registerTag("mapEntry", MapEntryTag.class); registerTag("message", MessageTag.class); registerTag("objectMessage", ObjectMessageTag.class); registerTag...
if (ldapServer.startsWith(dfltLDAPURL))
if (ldapServer.startsWith(dfltLDAPURL) || ldapServer.startsWith("ldaps:
protected void setJNDIProviderProperties() { // check if we're told to use a different initial context factory if (initDirContextEnv.getProperty( Context.INITIAL_CONTEXT_FACTORY) == (String) null) { initDirContextEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); } // ...
throw SQLExceptionFactory.notImplemented("createArray(String,Object[])");
checkForNullPhysicalConnection(); return physicalConnection_.createArray( typeName, elements );
public Array createArray(String typeName, Object[] elements) throws SQLException { throw SQLExceptionFactory.notImplemented("createArray(String,Object[])"); }
throw SQLExceptionFactory.notImplemented("createBlob()");
checkForNullPhysicalConnection(); return physicalConnection_.createBlob();
public Blob createBlob() throws SQLException { throw SQLExceptionFactory.notImplemented("createBlob()"); }
throw SQLExceptionFactory.notImplemented("createClob()");
checkForNullPhysicalConnection(); return physicalConnection_.createClob();
public Clob createClob() throws SQLException { throw SQLExceptionFactory.notImplemented("createClob()"); }
throw SQLExceptionFactory.notImplemented("createNClob()");
checkForNullPhysicalConnection(); return physicalConnection_.createNClob();
public NClob createNClob() throws SQLException { throw SQLExceptionFactory.notImplemented("createNClob()"); }
throw SQLExceptionFactory.notImplemented("createQueryObject(Class<T>)");
checkForNullPhysicalConnection(); return physicalConnection_.createQueryObject( ifc );
public <T extends BaseQuery>T createQueryObject(Class<T> ifc) throws SQLException { throw SQLExceptionFactory.notImplemented("createQueryObject(Class<T>)"); }
throw SQLExceptionFactory.notImplemented("createSQLXML()");
checkForNullPhysicalConnection(); return physicalConnection_.createSQLXML();
public SQLXML createSQLXML() throws SQLException { throw SQLExceptionFactory.notImplemented("createSQLXML()"); }
throw SQLExceptionFactory.notImplemented("createStruct(String,Object[])");
checkForNullPhysicalConnection(); return physicalConnection_.createStruct( typeName, attributes );
public Struct createStruct(String typeName, Object[] attributes) throws SQLException { throw SQLExceptionFactory.notImplemented("createStruct(String,Object[])"); }
ijE = new org.apache.derby.impl.tools.ij.Main14(false);
ijE = new Main(false);
public static int runScript( Connection conn, InputStream sqlIn, String inputEncoding, PrintStream sqlOut, String outputEncoding) throws UnsupportedEncodingException { LocalizedOutput lo = outputEncoding == null ? LocalizedResource.getInstance(). getNewOutput(sqlOut) ...
closeMethodArgument(acb, mb);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { ValueNode restriction = null; /* ** Get the next ResultSet #, so that we can number this ResultSetNode, ** its ResultColumnList and ResultSet. */ assignResultSetNumber(); // Get the CostEstimate info for ...
ClassName.NoPutResultSet, 14);
ClassName.NoPutResultSet, 13);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { ValueNode restriction = null; /* ** Get the next ResultSet #, so that we can number this ResultSetNode, ** its ResultColumnList and ResultSet. */ assignResultSetNumber(); // Get the CostEstimate info for ...
routineName = dd.getAliasDescriptor(routineUUID).getObjectName();
if (routineUUID != null) routineName = dd.getAliasDescriptor(routineUUID).getObjectName();
public RoutinePermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID routineUUID, boolean hasExecutePermission) throws StandardException { super (dd, grantee,...
library.registerBean(name, theClass);
library.registerBean(name, theClass, invokeMethod);
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { invokeBody(output); if (name == null) { throw new MissingAttributeException("name"); } if (className == null) { throw new MissingAttributeException("className"); } Class theClass = null; try { ...
this.columnNameMap = null;
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; // ResultSet's for metadata are single use, ...
ResultDescription rd = resultDescription; int columnCount = rd.getColumnCount(); for(int i = 1 ; i<= columnCount;i++) { String name = rd.getColumnDescriptor(i).getName(); if (StringUtil.SQLEqualsIgnoreCase(columnName, name)) { return i; } } throw newSQLException(SQLState.COLUMN_NOT_FOUND, columnName);
final Map workMap; synchronized (this) { if (columnNameMap==null) { columnNameMap = new HashMap(); for (int i = resultDescription.getColumnCount(); i>=1; i--) { final String key = StringUtil. SQLToUpperCase(resultDescription. getColumnDescriptor(i).getName()); final Integer value = ReuseFactory.getInteger(i); co...
protected int findColumnName(String columnName) throws SQLException { // n.b. if we went through the JDBC interface, // there is a caching implementation in the JDBC doc // (appendix C). But we go through our own info, for now. // REVISIT: we might want to cache our own info... if (columnName == null) ...
statementContext = lcc.pushStatementContext(true, getSource(), null, false);
statementContext = lcc.pushStatementContext(true, getSource(), null, false, 0L);
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;...
if ((pos <= 0) || (length < 0)) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " or length " + length);
if (pos <= 0) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_BAD_POSITION), new Long(pos)); } if (length < 0) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), new Integer(length));
public byte[] getBytes(long pos, int length) throws SqlException { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBytes", (int) pos, length); } if ((pos <= 0) || (length < 0)) { throw new...
throw new SqlException(agent_.logWriter_, "Search pattern cannot be null.");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NULL_PATTERN));
public long position(byte[] pattern, long start) throws SqlException { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "position(byte[], long)", pattern, start); } if (pattern == null) { throw...
if ((int) pos <= 0 || pos > binaryString_.length - dataOffset_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len);
if ((int) pos <= 0) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_BAD_POSITION), new Long(pos));
public int setBytesX(long pos, byte[] bytes, int offset, int len) throws SqlException { int length = 0; if ((int) pos <= 0 || pos > binaryString_.length - dataOffset_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or len...
if ((offset < 0) || offset > bytes.length || len < 0) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len);
if ( pos > binaryString_.length - dataOffset_) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_POSITION_TOO_LARGE), new Long(pos)); } if ((offset < 0) || offset > bytes.length ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_BLOB_OFFSET), new Integer(offset)); } if ( ...
public int setBytesX(long pos, byte[] bytes, int offset, int len) throws SqlException { int length = 0; if ((int) pos <= 0 || pos > binaryString_.length - dataOffset_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or len...
throw new SqlException(agent_.logWriter_, "Invalid length " + len);
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_API_PARAMETER), new Long(len), "len", "Blob.truncate()");
public void truncate(long len) throws SqlException { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, " truncate", (int) len); } if (len < 0 || len > this.length()) { throw new SqlException(age...
if (hasJava5FairLocks) { try { fairLock = fairLockConstructor.newInstance( new Object[] { Boolean.TRUE }); } catch (Exception e) { if (SanityManager.DEBUG) { SanityManager.THROWASSERT( "failed constructing ReentrantLock", e); } } }
RAFContainer(BaseDataFileFactory factory) { super(factory); }
synchronized (this) {
if (hasJava5FairLocks) { try { lock.invoke(fairLock, null); } catch (Exception e) { if (SanityManager.DEBUG) { SanityManager.THROWASSERT( "failed invoking ReentrantLock.lock()", e); } } }
protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; synchronized (this) { fileData.seek(pageOffset); fileData.readFully(pageData, 0, pageSize);...
fileData.seek(pageOffset); fileData.readFully(pageData, 0, pageSize);
try { synchronized (this) { fileData.seek(pageOffset); fileData.readFully(pageData, 0, pageSize); } } finally { if (hasJava5FairLocks) { try { unlock.invoke(fairLock, null); } catch (Exception e) { if (SanityManager.DEBUG) { SanityManager.THROWASSERT( "failed invoking ReentrantLock.unlock()", e); } } }
protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; synchronized (this) { fileData.seek(pageOffset); fileData.readFully(pageData, 0, pageSize);...
for (int h : new int[] { ResultSet.HOLD_CURSORS_OVER_COMMIT, ResultSet.CLOSE_CURSORS_AT_COMMIT }) { stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, h); rs = stmt.executeQuery("values(1)"); assert_(rs.getHoldability() == h, "holdability " + h); rs.close(); stmt.close();
conn.commit(); } catch(Exception e) { System.out.println("Unexpected exception caught " + e); e.printStackTrace(System.out); } finally { if (savedAutoCommit != null) { try { conn.setAutoCommit(savedAutoCommit); } catch (SQLException sqle) { sqle.printStackTrace(System.out); }
void t_getHoldability() { try { // test default holdability Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("values(1)"); assert_(rs.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT, "default holdability is HOLD_CU...
} catch(Exception e) { System.out.println("Unexpected exception caught"+e); e.printStackTrace();
void t_getHoldability() { try { // test default holdability Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("values(1)"); assert_(rs.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT, "default holdability is HOLD_CU...
columnList[ SYSTABLEPERMS_TABLEPERMSID - 1] =
columnList[ TABLEPERMSID_COL_NUM - 1] =
public SystemColumn[] buildColumnList() { if (columnList == null) { columnList = new SystemColumn[ COLUMN_COUNT]; columnList[ SYSTABLEPERMS_TABLEPERMSID - 1] = new SystemColumnImpl( convertIdCase( "TABLEPERMSID"), SYSTABLEPERMS_TABLEP...
SYSTABLEPERMS_TABLEPERMSID,
TABLEPERMSID_COL_NUM,
public SystemColumn[] buildColumnList() { if (columnList == null) { columnList = new SystemColumn[ COLUMN_COUNT]; columnList[ SYSTABLEPERMS_TABLEPERMSID - 1] = new SystemColumnImpl( convertIdCase( "TABLEPERMSID"), SYSTABLEPERMS_TABLEP...
String tablePermsUUIDString = row.getColumn(SYSTABLEPERMS_TABLEPERMSID).getString();
String tablePermsUUIDString = row.getColumn(TABLEPERMSID_COL_NUM).getString();
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTuple, DataDictionary dataDictionary) throws StandardException { if( SanityManager.DEBUG) SanityManager.ASSERT( row.nColumns() == COLUMN_COUNT, ...
case TABLEPERMSID_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 TABLEPERMSID_INDEX_NUM: row = getExecutionFactory().getIndexableRow( 1); String tablePermsUUIDStr = perm.getObjectID().toString(); row.setColumn(1, getDataValueFactory().getCharDataValue( tablePermsUUIDStr)); break;
public ExecIndexRow buildIndexKeyRow( int indexNumber, PermissionsDescriptor perm) throws StandardException { ExecIndexRow row = null; switch( indexNumber) { case GRANTEE_TABLE_GRANTOR_INDEX_NUM: // RESOLVE We do not suppo...
row.setColumn( SYSTABLEPERMS_TABLEPERMSID, dvf.getCharDataValue(tablePermID));
row.setColumn( TABLEPERMSID_COL_NUM, dvf.getCharDataValue(tablePermID));
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException { UUID oid; DataValueDescriptor grantee = null; DataValueDescriptor grantor = null; String tablePermID = null; String tableID = null; String selectPriv = null; String deletePriv =...
addDebugFlags(System.getProperty(Monitor.DEBUG_FALSE), false); addDebugFlags(System.getProperty(Monitor.DEBUG_TRUE), true);
addDebugFlags(PropertyUtil.getSystemProperty(Monitor.DEBUG_FALSE), false); addDebugFlags(PropertyUtil.getSystemProperty(Monitor.DEBUG_TRUE), true);
protected final void runWithState(Properties properties, PrintStream log) { bootProperties = properties; logging = log; // false indicates the full monitor is required, not the lite. if (!initialize(false)) return; // if monitor is already set then the system is already // booted or in the process of booting o...
DataSource ds = getDataSource();
DataSource ds = TestDataSourceFactory.getDataSource();
protected Connection newConnection_() throws SQLException { DataSource ds = getDataSource(); return ds.getConnection(CONFIG.getUserName(), CONFIG.getUserPassword()); }
ConnectionPoolDataSource ds = getConnectionPoolDataSource();
ConnectionPoolDataSource ds = TestDataSourceFactory.getConnectionPoolDataSource();
protected Connection newConnection_() throws SQLException { ConnectionPoolDataSource ds = getConnectionPoolDataSource(); PooledConnection pc = ds.getPooledConnection(CONFIG.getUserName(), CONFIG.getUserPassword()); return pc.g...
XADataSource ds = getXADataSource();
XADataSource ds = TestDataSourceFactory.getXADataSource();
protected Connection newConnection_() throws SQLException { XADataSource ds = getXADataSource(); XAConnection xac = ds.getXAConnection(CONFIG.getUserName(), CONFIG.getUserPassword()); return xac.getConnection(); }
throws SQLException{ checkIfClosed();
throws SQLClientInfoException{ Properties p = FailedProperties40.makeProperties(name,value); try { checkIfClosed(); } catch (SQLException se) { FailedProperties40 fp = new FailedProperties40(p); throw new SQLClientInfoException(se.getMessage(), se.getSQLState(), fp.getProperties()); }
public void setClientInfo(String name, String value) throws SQLException{ checkIfClosed(); // Allow null to simplify compliance testing through // reflection, (test all methods in an interface with null // arguments) if (name == null && value == null) { return; ...