rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
netAgent_.setTimeout(oldTimeout); | public boolean isValid(int timeout) throws SQLException { // Validate that the timeout has a legal value if (timeout < 0) { throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER, new Integer(timeout), "timeout", ... | |
pStmt.setString(1,"work1"); pStmt.setNull(2,java.sql.Types.TIMESTAMP,""); pStmt.addBatch(); | public static void test1(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; System.out.println("Test prepStmtNull starting"); ... | |
pStmt.setString(1,"blob1"); pStmt.setNull(2,java.sql.Types.BLOB,""); pStmt.addBatch(); | public static void test2(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; System.out.println("Test prepStmtNull starting"); ... | |
pStmt.setNull(1, Types.VARCHAR,""); pStmt.setBytes(2, b2); pStmt.execute(); | public static void test3(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; byte[] b2 = new byte[1]; b2[0] = (byte)64; System.out.println("Test3 prepStmtNull st... | |
throw Util.notImplemented(); | if (!isValid) return; isValid = false; if (!isString) ((Resetable)myStream).closeStream(); else myString = null; | public void free() throws SQLException { throw Util.notImplemented(); } |
checkValidity(); | public java.io.InputStream getAsciiStream() throws SQLException { return new ReaderToAscii(getCharacterStream()); } | |
checkValidity(); | public java.io.Reader getCharacterStream() throws SQLException { // if we have a string, not a stream if (isString) { return new StringReader(myString); } Object synchronization = getConnectionSynchronization(); synchronized (synchronization) { set... | |
checkValidity(); | public String getSubString(long pos, int length) throws SQLException { if (pos < 1) throw Util.generateCsSQLException( SQLState.BLOB_BAD_POSITION, new Long(pos)); if (length <= 0) throw Util.generateCsSQLException( SQLState.BLOB_NONPOSITIVE_LENGTH... | |
checkValidity(); | public long length() throws SQLException { // if we have a string, not a stream if (isString) return myString.length(); Object synchronization = getConnectionSynchronization(); synchronized (synchronization) { Reader clobReader = null; setupContextStack(); t... | |
checkValidity(); | public long position(String searchStr, long start) throws SQLException { boolean pushStack = false; try { if (start < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(start)); if (searchStr == null) ... | |
if (save != s1.timesServiced) throw T_Fail.testFailMsg("unsubscribed continue to get serviced"); | int diff = s1.timesServiced - save; T_Fail.T_ASSERT((diff == 0 || diff == 1), "unsubscribed continue to get serviced"); | private void T03(DaemonService daemon) throws T_Fail, StandardException { T_Serviceable s1 = new T_Serviceable(false); // unsubscribe this laster serviceRecord.addElement(s1); int sub1 = daemon.subscribe(s1, false); T_Serviceable e1 = new T_Serviceable(1); serviceRecord.addElement(e1); daemon.enqueue(e1, false... |
serviceRecord.clear(); | protected void runTestSet() throws T_Fail { try { /* test basic DaemonService interface */ T01(testDaemon); // basic subscription T02(testDaemon); // basic enqueue T03(testDaemon); // mixture of everything t_checkStatus(testDaemon); // make sure all serviceables I created got serviced } catch (StandardEx... | |
return new EmbedXAConnection(this, ra, getUser(), getPassword(), false); | return createXAConnection (ra, getUser(), getPassword(), false); | public final XAConnection getXAConnection() throws SQLException { if (ra == null || !ra.isActive()) setupResourceAdapter(null, null, false); return new EmbedXAConnection(this, ra, getUser(), getPassword(), false); } |
System.out.println("Testing Runtimeinfo (method)"); NetworkServerControl derbyServer = new NetworkServerControl( InetAddress.getByName("localhost"), NetworkServerControl.DEFAULT_PORTNUMBER); System.out.println(derbyServer.getRuntimeInfo()); System.out.println("End test (method)"); | 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 { ij.getPropertyArg(args);... | |
execCmdDumpResults(RuntimeinfoCmd); | NetworkServerControl derbyServer = new NetworkServerControl( InetAddress.getByName("localhost"), NetworkServerControl.DEFAULT_PORTNUMBER); System.out.println(derbyServer.getRuntimeInfo()); | 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 { ij.getPropertyArg(args);... |
writeSQLCARD(databaseAccessException, CodePoint.SVRCOD_ERROR,0,0); | private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check f... | |
writer.createDssObject(); writer.writeScalarString(CodePoint.TYPDEFNAM, CodePoint.TYPDEFNAM_QTDSQLASC); writeTYPDEFOVR(); writer.endDss(); writeSQLCARD(databaseAccessException, CodePoint.SVRCOD_ERROR,0,0); | private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check f... | |
skipRemainder(false); finalizeChain(); | private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check f... | |
finalizeChain(); break; } | private void writeRDBfailure(int codePoint) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(codePoint); writer.writeScalar2Bytes(CodePoint.SVRCOD, CodePoint.SVRCOD_ERROR); writeRDBNAM(database.dbName); writer.endDdmAndDss(); } | |
throw SQLExceptionFactory.notImplemented ("getRowIdLifetime ()"); | checkForClosedConnection(); return RowIdLifetime.ROWID_UNSUPPORTED; | public RowIdLifetime getRowIdLifetime() throws SQLException { throw SQLExceptionFactory.notImplemented ("getRowIdLifetime ()"); } |
throws StandardException | public CostEstimate getFinalCostEstimate() { /* ** The cost estimate will be set here if either optimize() or ** optimizeIt() was called on this node. It's also possible ** that optimization was done directly on the child node, ** in which case the cost estimate will be null here. */ if (costEstimate == null) ... | |
if (sql2j.getSQLValueNode().isParameterNode()) { | if (sql2j.getSQLValueNode().requiresTypeFromContext()) { ParameterNode pn; if (sql2j.getSQLValueNode() instanceof UnaryOperatorNode) pn = ((UnaryOperatorNode)sql2j.getSQLValueNode()).getParameterOperand(); else pn = (ParameterNode) (sql2j.getSQLValueNode()); | public void generateOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int parameterNumber ) throws StandardException { int parameterMode; SQLToJavaValueNode sql2j = null; if (methodParms[parameterNumber] instanceof SQLToJavaValueNode) sql2j = (SQLToJavaValueNode) methodParms[paramet... |
int applicationParameterNumber = ((ParameterNode) (sql2j.getSQLValueNode())).getParameterNumber(); | int applicationParameterNumber = pn.getParameterNumber(); | public void generateOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int parameterNumber ) throws StandardException { int parameterMode; SQLToJavaValueNode sql2j = null; if (methodParms[parameterNumber] instanceof SQLToJavaValueNode) sql2j = (SQLToJavaValueNode) methodParms[paramet... |
if ((sqlParamNode == null) || !sqlParamNode.isParameterNode()) | if ((sqlParamNode == null) || !sqlParamNode.requiresTypeFromContext()) | private void resolveRoutine(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, SchemaDescriptor sd) throws StandardException { if (sd.getUUID() != null) { java.util.List list = getDataDictionary().getRoutineList( sd.getUUID().toString(), methodName, forCallStatement ? AliasInfo.ALIAS_NAME_SPAC... |
applicationParameterNumbers[p] = ((ParameterNode) sqlParamNode).getParameterNumber(); | if (sqlParamNode instanceof UnaryOperatorNode) { ParameterNode pn = ((UnaryOperatorNode)sqlParamNode).getParameterOperand(); applicationParameterNumbers[p] = pn.getParameterNumber(); } else applicationParameterNumbers[p] = ((ParameterNode) sqlParamNode).getParameterNumber(); | private void resolveRoutine(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, SchemaDescriptor sd) throws StandardException { if (sd.getUUID() != null) { java.util.List list = getDataDictionary().getRoutineList( sd.getUUID().toString(), methodName, forCallStatement ? AliasInfo.ALIAS_NAME_SPAC... |
sqlParamNode.setDescriptor(paramdtd); | sqlParamNode.setType(paramdtd); | private void resolveRoutine(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, SchemaDescriptor sd) throws StandardException { if (sd.getUUID() != null) { java.util.List list = getDataDictionary().getRoutineList( sd.getUUID().toString(), methodName, forCallStatement ? AliasInfo.ALIAS_NAME_SPAC... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_isPoolable() { try { boolean b; b = ps.isPoolable(); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setBlob() { try { ps.setBlob(0,null,0); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setClob() { try { ps.setClob(0,null,0); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setNCharacterStream() { try { ps.setNCharacterStream(0,null,0); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setNClob1() { try { ps.setNClob(0,null); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setNClob2() { try { ps.setNClob(0,null,0); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setNString() { try { ps.setNString(0,null); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setPoolable() { try { ps.setPoolable(false); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setRowId() { try { ps.setRowId(0,null); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } } catch(... |
if(!message.equals(e.getMessage())) { | if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) { | void t_setSQLXML() { try { ps.setSQLXML(0,null); System.out.println("UnImplemented Exception not thrown in code"); } catch(SQLException e) { if(!message.equals(e.getMessage())) { System.out.println("Unexpected SQLException"+e); } ... |
System.out.println( "About to invoke method: " + methodName ); | public void doTag(XMLOutput output) throws Exception { TaskSource tag = (TaskSource) findAncestorWithClass( TaskSource.class ); if ( tag == null ) { throw new JellyException( "You should only use Ant DataType tags within an Ant Task" ); } Object task = tag.getT... | |
for (int i = 0; i < Reply.MAX_MARKS_NESTING; i++) { ddmCollectionLenStack_[i] = 0; } | Arrays.fill(ddmCollectionLenStack_, 0); | final void initialize() { pos_ = 0; count_ = 0; topDdmCollectionStack_ = Reply.EMPTY_STACK; for (int i = 0; i < Reply.MAX_MARKS_NESTING; i++) { ddmCollectionLenStack_[i] = 0; } ddmScalarLen_ = 0; dssLength_ = 0; dssIsContinued_ = false; dssIs... |
FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); | getCompilerContext().pushCurrentPrivType(getPrivType()); try { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimization(), getContextManager()); | public QueryTreeNode bind() throws StandardException { DataDictionary dataDictionary; dataDictionary = getDataDictionary(); // This is how we handle queries like: SELECT A FROM T ORDER BY B. // We pull up the order by columns (if they don't appear in the SELECT // LIST) and let the bind() do the job. Note tha... |
finally { getCompilerContext().popCurrentPrivType(); } | public QueryTreeNode bind() throws StandardException { DataDictionary dataDictionary; dataDictionary = getDataDictionary(); // This is how we handle queries like: SELECT A FROM T ORDER BY B. // We pull up the order by columns (if they don't appear in the SELECT // LIST) and let the bind() do the job. Note tha... | |
throws SQLException{ throw SQLExceptionFactory.notImplemented ("getClientInfo (String)"); | throws SQLException{ try { checkForClosedConnection(); return null; } catch (SqlException se) { throw se.getSQLException(); } | public String getClientInfo(String name) throws SQLException{ throw SQLExceptionFactory.notImplemented ("getClientInfo (String)"); } |
throws SQLException{ throw SQLExceptionFactory.notImplemented ("setClientInfo (String, String)"); | throws SQLException{ try { checkForClosedConnection(); } catch (SqlException se) { throw se.getSQLException(); } if (name == null && value == null) { return; } Properties p = new Properties(); p.setProperty(name, value); setClientInfo(p); | public void setClientInfo(String name, String value) throws SQLException{ throw SQLExceptionFactory.notImplemented ("setClientInfo (String, String)"); } |
start = dbUrl.indexOf("cloudscape:") + 11; | start = dbUrl.indexOf("derby:") + 6; | protected String extractDBNameFromUrl(String dbUrl) { if (dbUrl == null) // shouldn't happen; ignore it here, as an error // will be thrown we try to connect. return ""; int start = dbUrl.indexOf("jdbc:derby:"); if (start == -1) // not a valid url; just ignore it (an error // will be thrown when we try to con... |
if (args[start].length() == 2) sourceDBUrl = args[++start]; return start; | if (args[start].length() == 2) { sourceDBUrl = stripQuotes(args[++start]); return start; } return -1; | private int loadParam(String [] args, int start) { if ((args[start].length() == 0) || args[start].charAt(0) != '-') // starting argument should be a flag; if it's // not, ignore it. return start; boolean haveVal = (args.length > start + 1); switch (args[start].charAt(1)) { case 'd': if (!haveVal) retur... |
if (args[start].length() == 2) | if (args[start].length() == 2) { | private int loadParam(String [] args, int start) { if ((args[start].length() == 0) || args[start].charAt(0) != '-') // starting argument should be a flag; if it's // not, ignore it. return start; boolean haveVal = (args.length > start + 1); switch (args[start].charAt(1)) { case 'd': if (!haveVal) retur... |
return start; | return start; } return -1; | private int loadParam(String [] args, int start) { if ((args[start].length() == 0) || args[start].charAt(0) != '-') // starting argument should be a flag; if it's // not, ignore it. return start; boolean haveVal = (args.length > start + 1); switch (args[start].charAt(1)) { case 'd': if (!haveVal) retur... |
if ((args[start].length() == 2) && (args[start+1].length() > 0)) | if ((args[start].length() == 2) && (args[start+1].length() > 0)){ | private int loadParam(String [] args, int start) { if ((args[start].length() == 0) || args[start].charAt(0) != '-') // starting argument should be a flag; if it's // not, ignore it. return start; boolean haveVal = (args.length > start + 1); switch (args[start].charAt(1)) { case 'd': if (!haveVal) retur... |
Logs.reportMessage("CSLOOK_Header", "schemas"); | Logs.reportMessage("CSLOOK_SchemasHeader"); | public static void doSchemas(Connection conn, boolean tablesOnly) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT SCHEMANAME, SCHEMAID " + "FROM SYS.SYSSCHEMAS"); boolean firstTime = true; while (rs.next()) { String sName = dblook.addQuotes( dblook.ex... |
Logs.reportMessage("CSLOOK_Header", "indexes"); | Logs.reportMessage("CSLOOK_IndexesHeader"); | public static void doIndexes(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT TABLEID, CONGLOMERATENAME, " + "DESCRIPTOR, SCHEMAID, ISINDEX, ISCONSTRAINT FROM SYS.SYSCONGLOMERATES " + "ORDER BY TABLEID"); boolean firstTime = true; while (... |
Logs.reportMessage("CSLOOK_Header", "triggers"); | Logs.reportMessage("CSLOOK_TriggersHeader"); | public static void doTriggers (Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT TRIGGERNAME, SCHEMAID, " + "EVENT, FIRINGTIME, TYPE, TABLEID, REFERENCEDCOLUMNS, " + "TRIGGERDEFINITION, REFERENCINGOLD, REFERENCINGNEW, OLDREFERENCINGNAME, " ... |
int startOfCopyData = dataByte - dataToShift; | int startOfCopyData = dataByte - dataToShift + 1; | private void finalizeDssLength () { // calculate the total size of the dss and the number of bytes which would // require continuation dss headers. The total length already includes the // the 6 byte dss header located at the beginning of the dss. It does not // include the length of any continuation headers. int... |
twoByteContDssHeader = DssConstants.CONTINUATION_BIT; | twoByteContDssHeader = (twoByteContDssHeader | DssConstants.CONTINUATION_BIT); | private void finalizeDssLength () { // calculate the total size of the dss and the number of bytes which would // require continuation dss headers. The total length already includes the // the 6 byte dss header located at the beginning of the dss. It does not // include the length of any continuation headers. int... |
totalSize = DssConstants.CONTINUATION_BIT; | totalSize = (DssConstants.MAX_DSS_LENGTH | DssConstants.CONTINUATION_BIT); | private void finalizeDssLength () { // calculate the total size of the dss and the number of bytes which would // require continuation dss headers. The total length already includes the // the 6 byte dss header located at the beginning of the dss. It does not // include the length of any continuation headers. int... |
String hostName = getHostName(); if ( (!isEmbeddedFramework()) && (hostName != null ) && (attrs.getProperty("serverName") == null) ) attrs.setProperty("serverName", hostName); | private static Object getDataSourceWithReflection(String classname, Properties attrs) { Object[] args = null; Object ds = null; Method sh = null; String methodName = null; if (specialAttributes == null) { specialAttributes = new Hashtable(); specialAttributes.put("portNumber",INT_ARG_TYPE); specialAttrib... | |
double optimizerEstimatedCost, GeneratedMethod closeCleanup) | double optimizerEstimatedCost) | VTIResultSet(Activation activation, GeneratedMethod row, int resultSetNumber, GeneratedMethod constructor, String javaClassName, Qualifier[][] pushedQualifiers, int erdNumber, boolean version2, boolean reuseablePs, int ctcNumber, boolean isTarget, int scanIsolationLevel, doubl... |
this.closeCleanup = closeCleanup; | VTIResultSet(Activation activation, GeneratedMethod row, int resultSetNumber, GeneratedMethod constructor, String javaClassName, Qualifier[][] pushedQualifiers, int erdNumber, boolean version2, boolean reuseablePs, int ctcNumber, boolean isTarget, int scanIsolationLevel, doubl... | |
if (closeCleanup != null) { closeCleanup.invoke(activation); } | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if (isOpen) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be... | |
PrintStream originalStream = System.out; FileOutputStream shutdownLogStream = new FileOutputStream("testSecMec." + System.getProperty("framework","") + "." + "shutdown.std.log"); SwitchablePrintStream consoleLogStream = new SwitchablePrintStream( originalStream ); PrintStream originalErrStream = System.err; FileOutput... | String fileName = System.getProperty( "derby.system.home", "") + "serverConsoleOutput.log"; serverOutput = new FileOutputStream(fileName); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... |
networkServer.start(null); | networkServer.start(new PrintWriter(serverOutput)); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... |
new testSecMec(consoleLogStream, originalStream, shutdownLogStream, consoleErrLogStream, originalErrStream, shutdownErrLogStream); | new testSecMec(); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... |
consoleLogStream.switchOutput( shutdownLogStream ); consoleErrLogStream.switchOutput( shutdownErrLogStream ); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... | |
consoleLogStream.flush(); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... | |
consoleLogStream.switchOutput( originalStream ); consoleErrLogStream.switchOutput( originalErrStream ); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... | |
originalStream.close(); shutdownLogStream.close(); originalErrStream.close(); shutdownErrLogStream.close(); | serverOutput.close(); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... |
String[] parmTypeNames = getObjectSignature(); | String[] parmTypeNames; | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... |
try { | int signatureOffset = methodName.indexOf('('); | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... |
if (methodName.indexOf('(') != -1) { method = classInspector.findPublicMethod(javaClassName, methodName, staticMethod); methodName = method.getName(); | if (signatureOffset != -1) { parmTypeNames = parseValidateSignature(methodName, signatureOffset, hasDynamicResultSets); methodName = methodName.substring(0, signatureOffset); hasDynamicResultSets = false; | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... |
parmTypeNames = getObjectSignature(); } try { | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... | |
if (routineInfo == null) { | if (signatureOffset == -1 && routineInfo == null) { | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... |
} | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... | |
if (classInspector.primitiveType(methodParameter)) | if (ClassInspector.primitiveType(methodParameter)) | protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException { // only allow direct method calls through routines and internal SQL. if (routineInfo == null && !internalCall) { // See if we are being executed in an internal context if ((getCompilerContext().g... |
t_getRowId1(); t_getRowId2(); t_setRowId(); | void startCallableStatementMethodTest(Connection conn_in,CallableStatement cs_in) { conn = conn_in; cs = cs_in; t_getRowId1(); t_getRowId2(); t_setRowId(); t_setNString(); t_setNCharacterStream(); t_setNClob1(); t_setClob(); t_setBlob(); t... | |
DisconnectException de = new DisconnectException(agent_, "An error occurred during connect reset and the connection has been terminated. See chained exceptions for details."); | DisconnectException de = new DisconnectException(agent_, new MessageId(SQLState.CONNECTION_FAILED_ON_RESET)); | synchronized public void reset(LogWriter logWriter, String user, String password, ClientDataSource ds, boolean recomputeFromDataSource) throws SqlException { if (logWriter != null) { logWriter.traceConnectResetEntry(this, logWriter, user, (ds != null) ? ds : dataSource_); } try { ... |
TestSuite rsSuite = new TestSuite(ResultSetTest.class, "ResultSetTest suite"); if (usingDerbyNetClient()) { rsSuite.addTest( clientSuite("ResultSetTest client-only suite")); } if (usingEmbedded()) { rsSuite.addTest( embeddedSuite("ResultSetTest embedded-only suite")); } return new BaseJDBCTestSetup(rsSuite) { prote... | TestSuite rsSuite = new TestSuite("ResultSetTest suite"); | public static Test suite() { TestSuite rsSuite = new TestSuite(ResultSetTest.class, "ResultSetTest suite"); // Add client only tests // NOTE: JCC is excluded if (usingDerbyNetClient()) { rsSuite.addTest( clientSuite("ResultSetTest client-only suit... |
protected void tearDown() throws Exception { Connection con = getConnection(); Statement stmt = con.createStatement(); stmt.execute("drop table UpdateTestTableResultSet"); stmt.close(); super.tearDown(); } }; | TestSuite embedded = new TestSuite("ResultSetTest:embedded"); embedded.addTestSuite(ResultSetTest.class); embedded.addTest(embeddedSuite("ResultSetTest:embedded-only")); rsSuite.addTest(decorateTestSuite(embedded)); TestSuite client = new TestSuite("ResultSetTest:client"); client.addTestSuite(ResultSetTest.class); cli... | public static Test suite() { TestSuite rsSuite = new TestSuite(ResultSetTest.class, "ResultSetTest suite"); // Add client only tests // NOTE: JCC is excluded if (usingDerbyNetClient()) { rsSuite.addTest( clientSuite("ResultSetTest client-only suit... |
if ( STRICT_ENFORCEMENT && !md.isOptional() ) { continue; } | private void initializeExcludableMap() throws Exception { excludableMap = new Hashtable< Class, HashSet<Method> >(); int count = rawExcludables.length; for ( int i = 0; i < count; i++ ) { Exclusions exclusions = rawExcludables[ i ]; Class iface = exclusions.getInterface(); MD[] mds = exclusions.getE... | |
JarDBFile( JarDBFile dir, String name) | JarDBFile( JarStorageFactory storageFactory, String path) | JarDBFile( JarDBFile dir, String name) { super( dir,name); this.storageFactory = dir.storageFactory; } |
super( dir,name); this.storageFactory = dir.storageFactory; | super( storageFactory, path); this.storageFactory = storageFactory; | JarDBFile( JarDBFile dir, String name) { super( dir,name); this.storageFactory = dir.storageFactory; } |
abstract StorageFile getParentDir( int pathLen); | public StorageFile getParentDir() { if( path.length() <= storageFactory.separatedDataDirectory.length()) return null; return getParentDir( path.lastIndexOf( '/')); } | abstract StorageFile getParentDir( int pathLen); |
suite.addTest( SecurityManagerSetup.noSecurityManager( new DatabaseClassLoadingTest("testWithNoClasspath"))); | suite.addTest(new DatabaseClassLoadingTest("testWithNoClasspath")); | public static Test suite() { final TestSuite suite = new TestSuite("DatabaseClassLoadingTest"); // Need DriverManager to execute the add contact procedure // as it uses server side jdbc. Test test = suite; if (JDBC.vmSupportsJDBC3()) { suite.add... |
String startServerProp = ap.getProperty("startServer"); if (startServerProp != null && startServerProp.equalsIgnoreCase("false")) startServer =false; | private static String createPropString() throws ClassNotFoundException, FileNotFoundException, IOException { // Check for existence of app properties and/or derby.properties files // Copy the derby.properties to the db base directory // Then create the -p string for the test String p... | |
if (jvmnet && (framework.equals("DB2jNet") || framework.startsWith("DerbyNet"))) | if (jvmnet && framework.startsWith("DerbyNet")) | public static void main(String[] args) throws Exception { skiptestReason.setLength(0); // 0 out for useprocess // Determine the test type if (args.length == 0) { // No script name provided System.out.println("no test name provided"); System.exit(1); } scriptName = args[0]; if (Boolean.getBoolean("listOnl... |
ns = new NetServer(baseDir, jvmnetjvm, classpathServer, null, jvmflags,framework); | ns = new NetServer(baseDir, jvmnetjvm, classpathServer, null, jvmflags,framework, startServer); | public static void main(String[] args) throws Exception { skiptestReason.setLength(0); // 0 out for useprocess // Determine the test type if (args.length == 0) { // No script name provided System.out.println("no test name provided"); System.exit(1); } scriptName = args[0]; if (Boolean.getBoolean("listOnl... |
ns = new NetServer(baseDir, jvmName, classpathServer, javaCmd, jvmflags,framework); | ns = new NetServer(baseDir, jvmName, classpathServer, javaCmd, jvmflags,framework, startServer); | public static void main(String[] args) throws Exception { skiptestReason.setLength(0); // 0 out for useprocess // Determine the test type if (args.length == 0) { // No script name provided System.out.println("no test name provided"); System.exit(1); } scriptName = args[0]; if (Boolean.getBoolean("listOnl... |
System.out.println("Attempt to shutdown framework: " + framework); | public static void main(String[] args) throws Exception { skiptestReason.setLength(0); // 0 out for useprocess // Determine the test type if (args.length == 0) { // No script name provided System.out.println("no test name provided"); System.exit(1); } scriptName = args[0]; if (Boolean.getBoolean("listOnl... | |
public final void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setAsciiStream(String,InputStream,long)"); | public void setAsciiStream(String parameterName, InputStream x) throws SQLException { throw SQLExceptionFactory.notImplemented( "setAsciiStream(String,InputStream)"); | public final void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setAsciiStream(String,InputStream,long)"); } |
public final void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setBinaryStream(String,InputStream,long)"); | public void setBinaryStream(String parameterName, InputStream x) throws SQLException { throw SQLExceptionFactory.notImplemented( "setBinaryStream(String,InputStream)"); | public final void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setBinaryStream(String,InputStream,long)"); } |
public final void setCharacterStream(String parameterName, Reader x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setCharacterStream(String,Reader,long)"); | public void setCharacterStream(String parameterName, Reader reader) throws SQLException { throw SQLExceptionFactory.notImplemented( "setCharacterStream(String,Reader)"); | public final void setCharacterStream(String parameterName, Reader x, long length) throws SQLException { throw SQLExceptionFactory.notImplemented ("setCharacterStream(String,Reader,long)"); } |
ex.printStackTrace(); | public static void main(String[] args) { try { //Setup a Simple Logger PatternLayout layout = new PatternLayout( "%-5p\t[%t] %c: %m%n" ); //Logger for Console ConsoleAppender consoleAppender = new ConsoleAppender( layout ); logger.addAppender( consoleAppender ); //Logger for ... | |
ResultSet rs = ps.execute(spsActivation, false, false, false, 0L); | ResultSet rs = ps.execute(spsActivation, false, 0L); | protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... |
dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc); | { if (!grant) { ColPermsDescriptor tempColPermsDescriptor = dd.getColumnPermissions(td.getUUID(), colPermsDescs[i].getType() ,grant, grantee); colPermsDescs[i].setUUID(tempColPermsDescriptor.getUUID()); } else colPermsDescs[i].setUUID(null); dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc); } | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... |
boolean isXAConn) throws SqlException { | boolean isXAConn, ClientPooledConnection cpc) throws SqlException { | public NetXAConnection(NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) throws SqlException { ... |
dataSource, rmId, isXAConn); | dataSource, rmId, isXAConn,cpc); | public NetXAConnection(NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) throws SqlException { ... |
boolean isXAConn) throws SqlException { | boolean isXAConn, ClientPooledConnection cpc) throws SqlException { | protected NetConnection createNetConnection (NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) t... |
(netLogWriter, user, password,dataSource, rmId, isXAConn); | (netLogWriter, user, password,dataSource, rmId, isXAConn,cpc); | protected NetConnection createNetConnection (NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) t... |
new PreGoalCallback() { public void firePreGoal(Goal goal) throws Exception { | new PostGoalCallback() { public void firePostGoal(Goal goal) throws Exception { | public void doTag(final XMLOutput output) throws Exception { getGoal(getName()).addPostGoalCallback( new PreGoalCallback() { public void firePreGoal(Goal goal) throws Exception { // lets run the body log.info( "Running post target: " + g... |
for (int i = 0; i < resultColumns.size(); i++) { ResultColumn rc = (ResultColumn) resultColumns.elementAt(i); if (rc.isPrivilegeCollectionRequired()) compilerContext.addRequiredColumnPriv( rc.getTableColumnDescriptor()); } | public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException { TableDescriptor tableDescriptor = bindTableDescriptor(); if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) { ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI( ... | |
fsq.disablePrivilegeCollection(); | public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException { TableDescriptor tableDescriptor = bindTableDescriptor(); if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) { ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI( ... | |
void installJarTest() throws SQLException, Exception{ | void installJarTest() throws Exception{ | void installJarTest() throws SQLException, Exception{ logMessage("Begin Install Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); ... |
OnlineBackup backup = new OnlineBackup(TEST_DATABASE_NAME); | OnlineBackup backup = new OnlineBackup(TEST_DATABASE_NAME, BACKUP_PATH); | void installJarTest() throws SQLException, Exception{ logMessage("Begin Install Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.