rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Section section) throws SqlException { | Section section,ClientPooledConnection cpc) throws SqlException { | public PreparedStatement(Agent agent, Connection connection, String sql, Section section) throws SqlException { super(agent, connection); // PreparedStatement is poolable by default isPoolable = true; ini... |
pooledConnection_ = cpc; | public PreparedStatement(Agent agent, Connection connection, String sql, Section section) throws SqlException { super(agent, connection); // PreparedStatement is poolable by default isPoolable = true; ini... | |
if(pooledConnection_ != null) pooledConnection_.onStatementClose(this); | protected void markClosed(boolean removeListener){ super.markClosed(removeListener); if (parameterMetaData_ != null) { parameterMetaData_.markClosed(); parameterMetaData_ = null; } sql_ = null; // Apparently, the JVM is not smart enough to traverse parameters_... | |
if (stjvn.value.isParameterNode()) | if (stjvn.value.requiresTypeFromContext()) | protected boolean[] getIsParam() { if (methodParms == null) { return new boolean[0]; } boolean[] isParam = new boolean[methodParms.length]; for (int index = 0; index < methodParms.length; index++) { if (methodParms[index] instanceof SQLToJavaValueNode) { SQLToJavaValueNode stjvn = (SQLToJavaValueNode)... |
((SQLToJavaValueNode)methodParms[i]).value.setDescriptor( dts); | ((SQLToJavaValueNode)methodParms[i]).value.setType(dts); | public void setNullParameterInfo(String[] parmTypeNames) throws StandardException { for (int i = 0; i < methodParms.length; i++) { /* null parameters are represented by a java type name of "" */ if (methodParms[i].getJavaTypeName().equals("")) { /* Set the type information in the null constant node */ ... |
testCorrelationNamesAndMetaDataCalls(con); | public static void main(String[] args) { isDerbyNet = TestUtil.isNetFramework(); Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; String[] columnNames = {"i", "s", "r", "d", "dt", "t", "ts", "c", "v", "dc", "bi", "cbd", "vbd", "lvbd", "cl", "bl"}; System.out.println("Test resultset s... | |
return 29; | return 28; | public int getScanArgs( TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, MethodBuilder resultRowAlloca... |
System.out.println(i + "(0) " + new String(blob.getBytes(9905,50))); System.out.println(i + "(1) " + new String(blob.getBytes(5910,150))); System.out.println(i + "(2) " + new String(blob.getBytes(5910,50))); System.out.println(i + "(3) " + new String(blob.getBytes(204,50))); System.out.println(i + "(4) " + new String(b... | System.out.println(i + "(0) " + new String(blob.getBytes(9905,50), "US-ASCII")); System.out.println(i + "(1) " + new String(blob.getBytes(5910,150), "US-ASCII")); System.out.println(i + "(2) " + new String(blob.getBytes(5910,50), "US-ASCII")); System.out.println(i + "(3) " + new String(blob.getBytes(204,50), "US-ASCII"... | private static void blobTest2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) {... |
System.out.println(new String(res)); | System.out.println(new String(res, "US-ASCII")); | private static void blobTest2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) {... |
searchStr = new String(rs2.getBytes(1)); | searchStr = new String(rs2.getBytes(1),"US-ASCII"); | private static void blobTest4(Connection conn) { ResultSet rs, rs2; Statement stmt, stmt2; System.out.println(START + "blobTest4"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) ... |
ps.setBytes(1, val.getBytes()); | ps.setBytes(1, val.getBytes("US-ASCII")); | private static void blobTest51(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "blobTest51"); try { stmt = conn.createStatement(); stmt.execute("create table testVarbinary (a blob(13))"); PreparedStatement ps = conn.prepareStatement( ... |
blob.position("foo".getBytes(),2); | blob.position("foo".getBytes("US-ASCII"),2); | private static void blobTest94(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest94"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlo... |
blob.position("foo".getBytes(),2); | blob.position("foo".getBytes("US-ASCII"),2); | private static void blobTest95(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest95"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlo... |
FileReader fr = new FileReader(fileName[4]); | File file = new File(fileName[4]); InputStream fileIS = new FileInputStream(file); Reader fr = new InputStreamReader(fileIS, "US-ASCII"); | private static void clobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { System.out.println(START + "clobNegativeTest_Derby265"); // basically setup the tables for clob Statement s = conn.createStatement(); s.execute("create table \"MA... |
ps.setCharacterStream(6, new java.io.BufferedReader(fr),300000); | ps.setCharacterStream(6, fr, 300000); | private static void clobNegativeTest_Derby265(Connection conn) throws SQLException, FileNotFoundException,IOException { System.out.println(START + "clobNegativeTest_Derby265"); // basically setup the tables for clob Statement s = conn.createStatement(); s.execute("create table \"MA... |
insertRow(ps,"".getBytes()); insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes()); insertRow(ps,"a stitch in time says ouch".getBytes()); insertRow(ps,"here is a string with a return \n character".getBytes()); | insertRow(ps,"".getBytes("US-ASCII")); insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes("US-ASCII")); insertRow(ps,"a stitch in time says ouch".getBytes("US-ASCII")); insertRow(ps,"here is a string with a return \n character".getBytes("US-ASCII")); | private static void prepareBinaryTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareBinaryTable"); try { stmt = conn.createStatement(); stmt.execute("create table testBinary (a blob(80), b integer)"); PreparedStatement ps = conn.prepareStatement( ... |
insertRow(ps,"".getBytes()); insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes()); insertRow(ps,"a stitch in time says ouch".getBytes()); insertRow(ps,"here is a string with a return \n character".getBytes()); | insertRow(ps,"".getBytes("US-ASCII")); insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes("US-ASCII")); insertRow(ps,"a stitch in time says ouch".getBytes("US-ASCII")); insertRow(ps,"here is a string with a return \n character".getBytes("US-ASCII")); | private static void prepareBlobTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareBlobTable"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table testBlob (b integer)"); st... |
insertRow(ps,"horse".getBytes()); insertRow(ps,"ouch".getBytes()); insertRow(ps,"\n".getBytes()); insertRow(ps,"".getBytes()); insertRow(ps,"Beginning".getBytes()); insertRow(ps,"position-69".getBytes()); insertRow(ps,"I-am-hiding-here-at-position-5910".getBytes()); insertRow(ps,"Position-9907".getBytes()); | insertRow(ps,"horse".getBytes("US-ASCII")); insertRow(ps,"ouch".getBytes("US-ASCII")); insertRow(ps,"\n".getBytes("US-ASCII")); insertRow(ps,"".getBytes("US-ASCII")); insertRow(ps,"Beginning".getBytes("US-ASCII")); insertRow(ps,"position-69".getBytes("US-ASCII")); insertRow(ps,"I-am-hiding-here-at-position-5910".getByt... | private static void prepareSearchBlobTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareSearchBlobTable"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table searchBlob (b in... |
if (remainingBytes > 0) throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INEXACT_LENGTH_DATA)); | if (length > -1 && remainingBytes > 0) { throw new DerbyIOException( MessageService.getTextMessage( SQLState.SET_STREAM_INEXACT_LENGTH_DATA), SQLState.SET_STREAM_INEXACT_LENGTH_DATA); } | private void checkSufficientData() throws IOException { // if we reached here, then read call returned -1, and we // have already reached the end of stream, so set eof=true // so that subsequent reads on this stream will return an // EOFException eof = true; if (!limitInPlace) ... |
if (c != -1) throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INEXACT_LENGTH_DATA)); | if (c != -1) { if (length > -1) { throw new DerbyIOException( MessageService.getTextMessage( SQLState.SET_STREAM_INEXACT_LENGTH_DATA), SQLState.SET_STREAM_INEXACT_LENGTH_DATA); } else { throw new DerbyIOException( MessageService.getTextMessage( SQLState.LANG_STRING_TRUNCATION, typeName, "XXXX", String.valueOf(maximu... | private void checkSufficientData() throws IOException { // if we reached here, then read call returned -1, and we // have already reached the end of stream, so set eof=true // so that subsequent reads on this stream will return an // EOFException eof = true; if (!limitInPlace) ... |
if (isolationSetProperlyOnJoin) printState("re-join X1", cs1); | printState("re-join X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
xar.start(xid, XAResource.TMJOIN); printState("re-join X1 second time", cs1); xar.end(xid, XAResource.TMSUSPEND); printState("local after suspend", cs1); xar.start(xid, XAResource.TMRESUME); printState("resume X1", cs1); xar.end(xid, XAResource.TMSUCCESS); printState("back to local (second time)", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... | |
if (isolationSetProperlyOnJoin) printState("re-join with new handle X1", cs1); | printState("re-join with new handle X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
if (isolationSetProperlyOnJoin) printState("pre-X1 commit - X1", cs1); | printState("pre-X1 commit - X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
if (canSetIsolationWithStatement) testSetIsolationWithStatement(s, xar, cs1); | testSetIsolationWithStatement(s, xar, cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
generateParameterHolders(acb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (indexOfSessionTableNamesInSavedObjects != -1 ) //if this cursor references session schema tables, do following { MethodBuilder constructor = acb.getConstructor(); constructor.pushThis(); constructor.push(in... | |
updatableByCursor = fh.getBoolean("updatableByCursor"); | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { FormatableHashtable fh = (FormatableHashtable)in.readObject(); name = (String)fh.get("name"); tableName = (String)fh.get("tableName"); schemaName = (String)fh.get("schemaName"); columnPos = fh.getInt("columnPos"); type = (D... | |
fh.putBoolean("updatableByCursor", updatableByCursor); | public void writeExternal(ObjectOutput out) throws IOException { FormatableHashtable fh = new FormatableHashtable(); fh.put("name", name); fh.put("tableName", tableName); fh.put("schemaName", schemaName); fh.putInt("columnPos", columnPos); fh.put("type", type); fh.putBoolean("isAutoincrement", isAutoincrement);... | |
if( requiredRoutinePrivileges.get( routine.getUUID()) == null) requiredRoutinePrivileges.put( routine.getUUID(), ReuseFactory.getInteger(1)); | public void addRequiredRoutinePriv( AliasDescriptor routine) { // routine == null for built in routines if( requiredRoutinePrivileges == null || routine == null) return; if( requiredRoutinePrivileges.get( routine.getUUID()) == null) requiredRoutinePrivileges.put( routine.getUUID(), ReuseFactory.getInteger(1)); ... | |
if( requiredSchemaPrivileges != null) { for( Iterator itr = requiredSchemaPrivileges.values().iterator(); itr.hasNext();) { list.add( itr.next()); } } | public List getRequiredPermissionsList() { int size = 0; if( requiredRoutinePrivileges != null) size += requiredRoutinePrivileges.size(); if( requiredTablePrivileges != null) size += requiredTablePrivileges.size(); if( requiredColumnPrivileges != null) size += requiredColumnPrivileges.size(); ArrayList li... | |
requiredSchemaPrivileges = new HashMap(); | private void initRequiredPriv() { currPrivType = Authorizer.NULL_PRIV; privTypeStack.clear(); requiredColumnPrivileges = null; requiredTablePrivileges = null; requiredRoutinePrivileges = null; LanguageConnectionContext lcc = (LanguageConnectionContext) getContextManager().getContext(LanguageConnectionContext.CO... | |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest0(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest0"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,crc32 from testBlob"); testBlobContents(rs); stmt.close(); con... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) {... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest3(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest3"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) {... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest4(Connection conn) { ResultSet rs, rs2; Statement stmt, stmt2; System.out.println(START + "blobTest4"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest51(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "blobTest51"); try { stmt = conn.createStatement(); stmt.execute("create table testVarbinary (a blob(13))"); PreparedStatement ps = conn.prepareStatement( ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest52(Connection conn) { Statement stmt = null; System.out.println(START + "blobTest52"); try { stmt = conn.createStatement(); stmt.execute("create table testInteger2 (a integer)"); PreparedStatement ps = conn.prepareStatement("insert into testInteger2 values(158)"); ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest53(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "blobTest53"); try { stmt = conn.createStatement(); stmt.execute("create table testBlobColumn (a blob(1K))"); stmt.close(); System.out.println("blobTest53 fin... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest54(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest54"); try { stmt = conn.createStatement(); stmt.execute("create table testBlob2 (a integer, b integer)"); PreparedStatement ps = conn.prepareStatement( "insert... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest6(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest6"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); int i = 0, blobLength = 0; Blob blob; while (rs.next()) {... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest7(Connection conn) { ResultSet rs, rs2; Statement stmt1, stmt2; System.out.println(START + "blobTest7"); try { stmt1 = conn.createStatement(); stmt1.execute("create table testBlobX (a blob(300K), b integer)"); PreparedStatement ps = conn.prepareStatement( ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest8Trigger(Connection conn) { System.out.println(START + "blobTest8Trigger"); try { Statement stmt = conn.createStatement(); stmt.executeUpdate("CREATE TABLE blobTest8TriggerA (a BLOB(400k), b int, crc32 BIGINT)"); stmt.executeUpdate("CREAT... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest91(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest91"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); byte[] buff = new byte[128]; Blob[] blobArray = new Blob[numRows]; int[] ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; System.out.println(START + "blobTest92"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlo... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest93(Connection conn) { ResultSet rs; Statement stmt, stmt2; System.out.println(START + "blobTest93"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large columns stmt.execute("create table testLongRowBlob (a var... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest94(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest94"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlo... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest95(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest95"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); // fetch row back, get the column as a blob. Blob blob = null, shortBlo... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void blobTest96(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "blobTest96"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testBlob"); byte[] buff = new byte[128]; Blob[] blobArray = new Blob[numRows]; int[] ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void bug(Connection conn) { ResultSet rs; Statement stmt, stmt2; System.out.println(START + "bug" ); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large columns stmt.execute("create table testLongRowClob (a varchar(2000))")... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void bug2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "bug2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows*2]; int[] clobL... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest0(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest0"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; // fetch row back, get the column as a clob. ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest11(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "clobTest1"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); met = rs.getMetaData(); char[] buff = new char[128]; // fetch row... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest12(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest12"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, colLength = 0, arrayIndex = 0; while (rs.next()) {... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest13Trigger(Connection conn) { System.out.println(START + "clobTest13Trigger"); try { Statement stmt = conn.createStatement(); stmt.executeUpdate("CREATE TABLE clobTest13TriggerA (a CLOB(400k), b int)"); stmt.executeUpdate("CREATE TABLE clo... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.next()) ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest22(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest22"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, clobLength = 0, arrayIndex = 0; Clob clob; while (... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest3(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest3"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.next()) ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest32(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest32"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, clobLength = 0, arrayIndex = 0; long pos = 0; ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest4(Connection conn) { ResultSet rs, rs2; Statement stmt, stmt2; System.out.println(START + "clobTest4"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.nex... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest42(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest42"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); Clob[] clobArray = new Clob[numRowsUnicode]; int i = 0; ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest51(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "clobTest51"); try { stmt = conn.createStatement(); stmt.execute("create table testCLOB10 (a CLOB(10))"); PreparedStatement ps = conn.prepareStatement( "i... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest52(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { System.out.println(START + "clobTest52"); stmt = conn.createStatement(); System.out.println("create table testInteger (a integer)"); stmt.execute("create table testInteger (a integer)"); ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest53(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "clobTest53"); try { stmt = conn.createStatement(); stmt.execute("create table testClobColumn (a clob(1K))"); System.out.println("clobTest53 finished"); } catch... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest54(Connection conn) { ResultSet rs; Statement stmt1, stmt2; System.out.println(START + "clobTest54"); try { stmt1 = conn.createStatement(); stmt1.execute("create table testClob2 (a integer, b integer)"); PreparedStatement ps = conn.prepareStatement( ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest6(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest6"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; rs.next(); clo... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest7(Connection conn) { ResultSet rs, rs2; Statement stmt1, stmt2; System.out.println(START + "clobTest7"); try { stmt1 = conn.createStatement(); stmt1.execute("create table testClob7 (a CLOB(300k), b integer)"); PreparedStatement ps = conn.prepareStatement( ... |
e.printStackTrace(); | e.printStackTrace(System.out); | private static void clobTest8(Connection conn) { System.out.println(START + "clobTest8"); try { Statement s = conn.createStatement(); s.execute("CREATE TABLE C8.T8POS(id INT NOT NULL PRIMARY KEY, DD CLOB(1m), pos INT, L INT)"); s.execute("CREATE TABLE C8.T8PATT(PATT CLOB(300k))"); // characters used t... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest91(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest91"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows]; i... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; System.out.println(START + "clobTest92"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); // fetch row back, get the column as a clob. Clob clob = nul... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest93(Connection conn) { ResultSet rs; Statement stmt, stmt2; System.out.println(START + "clobTest93"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large columns stmt.execute("create table testLongRowClob (a var... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest94(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest94"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); // fetch row back, get the column as a clob. Clob clob = null, sho... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest95(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest95"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); // fetch row back, get the column as a clob. Clob clob = null, sho... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest96(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTest96"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows]; i... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTest9999(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println(START + "clobTest9999"); try { stmt = conn.createStatement(); stmt.execute("call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','4096')"); stmt.execute("create table c... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTestGroupfetch(Connection conn) { ResultSet rs; Statement stmt,stmt2; System.out.println(START + "clobTestGroupFetch"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); // fetch row back, get the column as a clob. ... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTestSelfDestructive(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTestSelfDestructive"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN where b = 10000"); byte[] buff = new byte[128]; // f... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void clobTestSelfDestructive2(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "clobTestSelfDestructive2"); try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN where b = 10000"); byte[] buff = new byte[128]; //... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | public static void main(String[] args) { System.out.println("Test blobclob starting"); isDerbyNet = TestUtil.isNetFramework(); try { // first check to see if the path to extin/out dir is ok. sep = System.getProperty("file.separator"); boolean exists = (new File(filePath, f... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareBinaryTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareBinaryTable"); try { stmt = conn.createStatement(); stmt.execute("create table testBinary (a blob(80), b integer, crc32 bigint)"); PreparedStatement ps = conn.prepa... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareBlobTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareBlobTable"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table testBlob (b integer)"); st... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareCLOBMAIN(Connection conn) { System.out.println(START +"prepareCLOBMAIN"); ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute( // creating table small then add large column - that way forcing table to have default small page size, but have lar... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareSearchBlobTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareSearchBlobTable"); try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table searchBlob (b in... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareSearchClobTable(Connection conn) { System.out.println(START + "prepareSearchClobTable"); ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); // creating table small then add large column - that way forcing table to have default small page size, but h... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareUnicodeFile(Connection conn) { System.out.println(START + "prepareUnicodeFile"); try { File file = new File(unicodeFileName); OutputStream fos = new FileOutputStream(file); Writer filew = new OutputStreamWriter(fos,"UTF8"); // Fi... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void prepareUnicodeTable(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "prepareUnicodeTable"); try { stmt = conn.createStatement(); // creating table small then add large column - that way forcing table to have default small page size, but have large rows. ... |
if (debug) obe.printStackTrace(); | if (debug) obe.printStackTrace(System.out); | static void printInterval(Clob clob, long pos, int length, int testNum, int iteration, int clobLength) { if (pos > clobLength + 1) System.out.println("CLOB getSubString " + pos + " > " + clobLength); try { /* System.out.println("printInterval(" + clob + "," + pos +"," + length... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | static void printInterval(Clob clob, long pos, int length, int testNum, int iteration, int clobLength) { if (pos > clobLength + 1) System.out.println("CLOB getSubString " + pos + " > " + clobLength); try { /* System.out.println("printInterval(" + clob + "," + pos +"," + length... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void printLockTable(Connection conn) { ResultSet rs; Statement stmt,stmt2; try { System.out.println("\nLock table\n----------------------------------------"); stmt = conn.createStatement(); rs = stmt.executeQuery( "select xid,type,lockcount,mode,tablename... |
e.printStackTrace(); | e.printStackTrace(System.out); | static void printPosition( int rowNum, String searchStr, long position, Clob clob, long clobLength) { try { long result = clob.position(searchStr,position); System.out.println("Found " + searchStr + " in row " + rowNum + " starti... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void setCharacterStreamTest(Connection conn) { ResultSet rs; Statement stmt; System.out.println(START + "setCharacterStreamTest"); try { stmt = conn.createStatement(); // forcing table with default table space. stmt.execute("call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.stor... |
if (debug) e.printStackTrace(); | if (debug) e.printStackTrace(System.out); | private static void unicodeTest() { System.out.println(START + "unicodeTest"); try { // String to Unicode bytes byte[] unicodeArray = {0xfffffffe, 0xffffffff, 0x01, 0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x6f}; String str = ne... |
public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; CallableStatement cs_main=null; | public static void main(String args[]) { try { ij.getPropertyArg(args); Connection conn_main = ij.startJBMS(); CallableStatement cs_main = conn_main.prepareCall("select count(*) from sys.systables"); | public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; CallableStatement cs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e) { e.printStackTrace... |
try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e) { e.printStackTrace(); } try { cs_main = conn_main.prepareCall("select count(*) from sys.systables"); } catch(SQLException e) { System.out.println(""+e); e.printStackTrace(); } TestCallableStatementMethods tcsm = new Test... | TestCallableStatementMethods tcsm = new TestCallableStatementMethods(); tcsm.startCallableStatementMethodTest(conn_main,cs_main); } catch(Exception e) { System.out.println(""+e); e.printStackTrace(); } | public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; CallableStatement cs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e) { e.printStackTrace... |
(String databaseName) | (String databaseName, String connAttrs) | public static Properties getDataSourcePropertiesForDatabase (String databaseName) { Properties attrs = new Properties(); if (!(getCurrent().getJDBCClient() == JDBCClient.EMBEDDED)) { attrs.setProperty("serverName", getCurrent().getHostName()); attrs.setProperty("po... |
attrs.setProperty("connectionAttributes", "create=true"); | attrs.setProperty("connectionAttributes", connAttrs); | public static Properties getDataSourcePropertiesForDatabase (String databaseName) { Properties attrs = new Properties(); if (!(getCurrent().getJDBCClient() == JDBCClient.EMBEDDED)) { attrs.setProperty("serverName", getCurrent().getHostName()); attrs.setProperty("po... |
getCurrent().getDatabaseName()); | getCurrent().getDatabaseName(), "create=true"); | public static Properties getDefaultDataSourceProperties() { return getDataSourcePropertiesForDatabase( getCurrent().getDatabaseName()); } |
Connection con = null; JDBCClient client =getJDBCClient(); if (JDBC.vmSupportsJDBC2()) { loadJDBCDriver(client.getJDBCDriverName()); if (!isSingleLegXA()) { con = DriverManager.getConnection( getJDBCUrl(databaseName) + ";create=true", getUserName(), getUserPassword()); } else { Properties attrs = getDataSourcePropertie... | return getConnection(databaseName, "create=true"); | public Connection openConnection (String databaseName) throws SQLException { Connection con = null; JDBCClient client =getJDBCClient(); if (JDBC.vmSupportsJDBC2()) { loadJDBCDriver(client.getJDBCDriverName()); if (!isSingleLegXA()) { con = Driver... |
return openConnection(getDatabaseName()); | return getDefaultConnection("create=true"); | public Connection openDefaultConnection() throws SQLException { return openConnection(getDatabaseName()); } |
public void backup(String backupDir) throws StandardException { | public void backup(String backupDir, boolean wait) throws StandardException { | public void backup(String backupDir) throws StandardException { if (backupDir == null || backupDir.equals("")) { throw StandardException.newException( SQLState.RAWSTORE_CANNOT_CREATE_BACKUP_DIRECTORY, (File)null); } // in case this is an URL form String backupDirURL = null; try { U... |
canStartOnlineBackup(t, true); backup(t, new File(backupDir)); }finally { xactFactory.backupFinished(); } | if (!xactFactory.stopBackupBlockingOperations(wait)) { throw StandardException.newException( SQLState.BACKUP_BLOCKING_OPERATIONS_IN_PROGRESS); } backup(t, new File(backupDir)); }finally { xactFactory.backupFinished(); } | public void backup(String backupDir) throws StandardException { if (backupDir == null || backupDir.equals("")) { throw StandardException.newException( SQLState.RAWSTORE_CANNOT_CREATE_BACKUP_DIRECTORY, (File)null); } // in case this is an URL form String backupDirURL = null; try { U... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.