rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
System.out.println(START + "clobTest3");
private static void clobTest3(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.next()) { i++; c...
System.out.println(START + "clobTest32");
private static void clobTest32(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); int i = 0, clobLength = 0, arrayIndex = 0; long pos = 0; Clob clob; while (rs.next()) ...
System.out.println(START + "clobTest4");
private static void clobTest4(Connection conn) { ResultSet rs, rs2; Statement stmt, stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; while (rs.next()) { i++; ...
System.out.println(START + "clobTest42");
private static void clobTest42(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b,c from testUnicode"); Clob[] clobArray = new Clob[numRowsUnicode]; int i = 0; long pos = 0; while (rs.next()) ...
System.out.println(START + "clobTest51");
private static void clobTest51(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testCLOB10 (a CLOB(10))"); PreparedStatement ps = conn.prepareStatement( "insert into testCLOB10 values(?)"); ...
System.out.println(START + "clobTest52");
private static void clobTest52(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); System.out.println("create table testInteger (a integer)"); stmt.execute("create table testInteger (a integer)"); int i = 1; System.out.println("in...
System.out.println(START + "clobTest53");
private static void clobTest53(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testClobColumn (a clob(1K))"); System.out.println("clobTest53 finished"); } catch (SQLException e) { TestUtil.dumpSQLExcept...
System.out.println("start clobTest54");
private static void clobTest54(Connection conn) { ResultSet rs; Statement stmt1, stmt2; try { System.out.println("start clobTest54"); stmt1 = conn.createStatement(); stmt1.execute("create table testClob2 (a integer, b integer)"); PreparedStatement ps = conn.prepareStatement( ...
System.out.println(START + "clobTest6");
private static void clobTest6(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); int i = 0, clobLength = 0; Clob clob; rs.next(); clob = rs.getClob(1); if (clob == ...
System.out.println("start clobTest7");
System.out.println(START + "clobTest7");
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( ...
System.out.println("start clobTest8");
System.out.println(START + "clobTest8");
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 to fi...
System.out.println(START + "clobTest91");
private static void clobTest91(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows]; int[] clobLengthArray = new int[numRows]; ...
System.out.println(START + "clobTest92");
private static void clobTest92(Connection conn) { ResultSet rs; Statement stmt,stmt2; 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, shortClob = null; int clobLen...
System.out.println(START + "clobTest93");
private static void clobTest93(Connection conn) { ResultSet rs; Statement stmt, stmt2; 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))"); stmt.execute("alter table ...
System.out.println(START + "clobTest95");
private static void clobTest95(Connection conn) { ResultSet rs; Statement stmt; 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, shortClob = null; int clobLength; ...
System.out.println(START + "clobTest96");
private static void clobTest96(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); byte[] buff = new byte[128]; Clob[] clobArray = new Clob[numRows]; int[] clobLengthArray = new int[numRows]; ...
System.out.println(START + "clobTest9999");
private static void clobTest9999(Connection conn) { ResultSetMetaData met; ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','4096')"); stmt.execute("create table clobTest9999 (a CLOB(300k))"); stmt.execute(...
System.out.println(START + "clobTestGroupFetch");
private static void clobTestGroupfetch(Connection conn) { ResultSet rs; Statement stmt,stmt2; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN"); // fetch row back, get the column as a clob. int clobLength; while (rs.next()) { ...
System.out.println(START + "clobTestSelfDestructive");
private static void clobTestSelfDestructive(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN where b = 10000"); byte[] buff = new byte[128]; // fetch row back, get the column as a clob. Clob...
System.out.println(START + "clobTestSelfDestructive2");
private static void clobTestSelfDestructive2(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select a,b from testCLOB_MAIN where b = 10000"); byte[] buff = new byte[128]; // fetch row back, get the column as a clob. Clo...
System.out.println("Test blobclob finished");
System.out.println("Test blobclob finished\n");
public static void main(String[] args) { System.out.println("Test blobclob starting"); isDerbyNet = TestUtil.isNetFramework(); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Connection conn = ij.startJBMS(); // turn off...
System.out.println(START + "prepareBinaryTable");
private static void prepareBinaryTable(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); stmt.execute("create table testBinary (a blob(80), b integer)"); PreparedStatement ps = conn.prepareStatement( "insert into testBinary values(?,?)")...
System.out.println(START + "prepareBlobTable");
private static void prepareBlobTable(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table testBlob (b integer)"); stmt.execute("alter table testBlob add column a blo...
System.out.println(START +"prepareCLOBMAIN");
private static void prepareCLOBMAIN(Connection conn) { //System.out.println("prepareCLOBMAIN started"); 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 ...
System.out.println(START + "prepareSearchBlobTable");
private static void prepareSearchBlobTable(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); // creating table to fit within default 4k table size, then add large column stmt.execute("create table searchBlob (b integer)"); stmt.execute("alter table searchBlob add co...
System.out.println(START + "prepareSearchClobTable");
private static void prepareSearchClobTable(Connection conn) { //System.out.println("prepareSearchClobTable started"); 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...
System.out.println("prepareSearchClobTable finished");
private static void prepareSearchClobTable(Connection conn) { //System.out.println("prepareSearchClobTable started"); 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...
System.out.println(START + "prepareUnicodeFile");
private static void prepareUnicodeFile(Connection conn) { try { File file = new File(unicodeFileName); OutputStream fos = new FileOutputStream(file); Writer filew = new OutputStreamWriter(fos,"UTF8"); // FileWriter filew = new FileWriter(file); filew...
System.out.println(START + "prepareUnicodeTable");
private static void prepareUnicodeTable(Connection conn) { 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 have large rows. stmt.execute("create table testUnicode (b integer, c ...
expected = isOutOfBoundException(e); TestUtil.dumpSQLExceptions(e, expected); if (!expected) e.printStackTrace();
{ if (isOutOfBoundException(e)) expected = true; } else { System.out.println("FAIL -- unexpected exception:" + e.toString()); } TestUtil.dumpSQLExceptions(e,expected);
static void printInterval(Clob clob, long pos, int length, int testNum, int iteration, int clobLength) { if (pos > clobLength) System.out.println("CLOB getSubString " + pos + " > " + clobLength); try { /* System.out.println("printInterval(" + clob + "," + pos +"," + length +",...
System.out.println("Known JCC Bug 5914 - " + e.getMessage()); else System.out.println("Known JCC Bug 5914");
System.out.println("EXPECTED Out of bounds exception"); else { System.out.println("FAIL -- unexpected exception:" + e.toString()); if (debug) e.printStackTrace(); }
static void printInterval(Clob clob, long pos, int length, int testNum, int iteration, int clobLength) { if (pos > clobLength) System.out.println("CLOB getSubString " + pos + " > " + clobLength); try { /* System.out.println("printInterval(" + clob + "," + pos +"," + length +",...
System.out.println(START + "setCharacterStreamTest");
private static void setCharacterStreamTest(Connection conn) { ResultSet rs; Statement stmt; try { stmt = conn.createStatement(); // forcing table with default table space. stmt.execute("call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','4096')"); stmt.execute("create table te...
System.out.println(START + "unicodeTest");
private static void unicodeTest() { try { // String to Unicode bytes byte[] unicodeArray = {0xfffffffe, 0xffffffff, 0x01, 0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x6f}; String str = new String (unicodeArray, "Unicode"); ...
System.out.println("getJDBCMajorVersion() : " + met.getJDBCMajorVersion()); System.out.println(); System.out.println("getJDBCMinorVersion() : " + met.getJDBCMinorVersion());
checkJDBCVersion(met);
public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm...
"procedure isreadO" };
"procedure isreadO", "FUNCTION DUMMY1", "FUNCTION DUMMY2", "FUNCTION DUMMY3", "FUNCTION DUMMY4" };
protected void cleanUp(Statement stmt) throws SQLException { con.setAutoCommit(true); String[] testObjects = {"table t", "table t1", "view screwie", "table reftab", "table reftab2", "table inflight" , "table alltypes", "table louie", "procedure getpctest1", "procedure getpctest2", "procedure getpctest3a", ...
throw SQLExceptionFactory.notImplemented ("isValid ()");
if (timeout < 0) { throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER, new Integer(timeout), "timeout", "java.sql.Connection.isValid"); } if (isClosed()) { return false; } synchronized(this) { try { if (isValidStmt == null) { isValidStmt = prepareStatement("VALUES (1)"); } isValidStmt.setQueryTime...
public boolean isValid(int timeout) throws SQLException { throw SQLExceptionFactory.notImplemented ("isValid ()"); }
columnReference.getFullColumnName());
columnReference.getSQLColumnName());
public ResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException { /* Get the logical left and right sides of the join. * (For RIGHT OUTER JOIN, the left is the right * and the right is the left and the JOIN is the NIOJ). */ ResultSetNode logicalLeftRS = getLogicalLeftResultSet()...
} catch (IOException ioe) { throw StandardException.newException( SQLState.FILE_CONTAINER_EXCEPTION, ioe, this, ioe); } finally {
} catch (IOException ioe) { throw StandardException. newException(SQLState.FILE_CONTAINER_EXCEPTION, ioe, this); } finally {
final boolean openContainer(ContainerKey newIdentity) throws StandardException { DataInputStream dis = null; try { InputStream is = null; containerPath = dataFactory.getContainerPath(newIdentity, false); try { is = containerPath.getInputStream(); } ...
execCmdDumpResults(maxthreadsCmd6);
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);...
throws StandardException
public ValueNode restoreConstantPredicates() { AndNode nextAnd; AndNode falseAnd = null; ValueNode restriction = null; /* Walk list backwards since we can delete while * traversing the list. */ for (int index = size() - 1; index >= 0; index--) { /* Look at the current predicate from the predicate list...
throws StandardException
public ValueNode restorePredicates() { AndNode nextAnd; AndNode falseAnd = null; ValueNode restriction = null; int size = size(); for (int index = 0; index < size; index++) { nextAnd = ((Predicate) elementAt(index)).getAndNode(); /* We can skip over TRUE AND TRUE */ if ((nextAnd.getLeftOperand().isBoo...
throws StandardException
private double selectivityNoStatistics(Optimizable optTable) { double selectivity = 1.0; for (int i = 0; i < size(); i++) { OptimizablePredicate pred = (OptimizablePredicate)elementAt(i); selectivity *= pred.selectivity((Optimizable)optTable); } return selectivity; }
public static final int writeLong(OutputStream out, long value) throws IOException {
public static final int writeLong(DataOutput out, long value) throws IOException {
public static final int writeLong(OutputStream out, long value) throws IOException { if (value < 0) throw new IOException(); if (value <= 0x3fff) { out.write((int) ((value >>> 8) & 0xff)); out.write((int) ((value ) & 0xff)); return 2; } if (value <= 0x3fffffff) { out.write((int) (((value >>> 24) | 0...
out.write((int) ((value >>> 8) & 0xff)); out.write((int) ((value ) & 0xff));
out.writeByte((int) ((value >>> 8) & 0xff)); out.writeByte((int) ((value ) & 0xff));
public static final int writeLong(OutputStream out, long value) throws IOException { if (value < 0) throw new IOException(); if (value <= 0x3fff) { out.write((int) ((value >>> 8) & 0xff)); out.write((int) ((value ) & 0xff)); return 2; } if (value <= 0x3fffffff) { out.write((int) (((value >>> 24) | 0...
out.write((int) (((value >>> 24) | 0x40) & 0xff)); out.write((int) ( (value >>> 16) & 0xff)); out.write((int) ( (value >>> 8) & 0xff)); out.write((int) ( (value ) & 0xff));
out.writeByte((int) (((value >>> 24) | 0x40) & 0xff)); out.writeByte((int) ( (value >>> 16) & 0xff)); out.writeByte((int) ( (value >>> 8) & 0xff)); out.writeByte((int) ( (value ) & 0xff));
public static final int writeLong(OutputStream out, long value) throws IOException { if (value < 0) throw new IOException(); if (value <= 0x3fff) { out.write((int) ((value >>> 8) & 0xff)); out.write((int) ((value ) & 0xff)); return 2; } if (value <= 0x3fffffff) { out.write((int) (((value >>> 24) | 0...
out.write((int) (((value >>> 56) | 0x80) & 0xff)); out.write((int) ( (value >>> 48) & 0xff)); out.write((int) ( (value >>> 40) & 0xff)); out.write((int) ( (value >>> 32) & 0xff)); out.write((int) ( (value >>> 24) & 0xff)); out.write((int) ( (value >>> 16) & 0xff)); out.write((int) ( (value >>> 8) & 0xff)); out.write((...
out.writeByte((int) (((value >>> 56) | 0x80) & 0xff)); out.writeByte((int) ( (value >>> 48) & 0xff)); out.writeByte((int) ( (value >>> 40) & 0xff)); out.writeByte((int) ( (value >>> 32) & 0xff)); out.writeByte((int) ( (value >>> 24) & 0xff)); out.writeByte((int) ( (value >>> 16) & 0xff)); out.writeByte((int) ( (value >...
public static final int writeLong(OutputStream out, long value) throws IOException { if (value < 0) throw new IOException(); if (value <= 0x3fff) { out.write((int) ((value >>> 8) & 0xff)); out.write((int) ((value ) & 0xff)); return 2; } if (value <= 0x3fffffff) { out.write((int) (((value >>> 24) | 0...
suite.addTestSuite(JDBC40TranslationTest.class);
suite.addTest(JDBC40TranslationTest.suite());
public static Test suite() throws SQLException { TestSuite suite = new TestSuite("jdbc4"); // These really need to run standalone. //suite.addTestSuite(AutoloadBooting.class); //suite.addTestSuite(AutoloadTest.class); suite.addTest(BlobTest.suite()); suite.addTest(CallableStatementTest.suite()); s...
suite.addTestSuite(UnsupportedVetter.class);
suite.addTest(UnsupportedVetter.suite());
public static Test suite() throws SQLException { TestSuite suite = new TestSuite("jdbc4"); // These really need to run standalone. //suite.addTestSuite(AutoloadBooting.class); //suite.addTestSuite(AutoloadTest.class); suite.addTest(BlobTest.suite()); suite.addTest(CallableStatementTest.suite()); s...
else dd.dropAllRoutinePermDescriptors(ad.getUUID(), tc);
public void executeConstantAction( Activation activation ) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); TransactionController tc = lcc.getTransactionExecute(); DependencyManager dm = dd.getDependencyManager()...
throw Util.notImplemented();
if (!isValid) return; isValid = false; myLength = -1; if (!isBytes) ((Resetable)myStream).closeStream(); else myBytes = null;
public void free() throws SQLException { throw Util.notImplemented(); }
checkValidity();
public java.io.InputStream getBinaryStream() throws SQLException { boolean pushStack = false; try { // if we have byte array, not a stream if (isBytes) { return new NewByteArrayInputStream(myBytes); } else ...
checkValidity();
public byte[] getBytes(long startPos, int length) throws SQLException { boolean pushStack = false; try { if (startPos < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(startPos)); if (length <= 0) ...
checkValidity();
public long length() throws SQLException { if (myLength != -1) return myLength; boolean pushStack = false; try { // we have a stream synchronized (getConnectionSynchronization()) { pushStack = !getEmbedConnection...
checkValidity();
public long position(byte[] pattern, long start) throws SQLException { boolean pushStack = false; try { if (start < 1) throw StandardException.newException( SQLState.BLOB_BAD_POSITION, new Long(start)); if (pattern == null) ...
((ResultColumn) elementAt(index)).markUpdatableByCursor();
if (((ResultColumn) elementAt(index)).getSourceTableName() != null) ((ResultColumn) elementAt(index)).markUpdatableByCursor();
void markUpdatableByCursor() { int size = size(); for (int index = 0; index < size; index++) { ((ResultColumn) elementAt(index)).markUpdatableByCursor(); } }
if (ddlFileName != null) ddlFile = new PrintWriter(new FileOutputStream(ddlFileName, appendLogs));
ddlFile = (ddlFileName == null) ? null : new PrintWriter(new FileOutputStream(ddlFileName, appendLogs));
public static boolean initLogs(String logFileName, String ddlFileName, boolean appendLogs, boolean doVerbose, String endOfStmt) { try { logFile = new PrintWriter(new FileOutputStream(logFileName, appendLogs)); if (ddlFileName != null) ddlFile = new PrintWriter(new FileOutputStream(ddlFileName, appendLogs)); ...
Properties shutdownAttrs = new Properties(); shutdownAttrs.setProperty("shutdownDatabase", "shutdown");
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...
DataSource ds = TestUtil.getDataSource(shutdownAttrs); ds.getConnection();
TestUtil.getConnection("", "shutdown=true");
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...
Properties restoreAttrs = new Properties(); restoreAttrs.setProperty("DatabaseName", "hairynosedwombat"); restoreAttrs.setProperty("connectionAttributes", "rollForwardRecoveryFrom=extinout/mybackup/hairynosedwombat"); DataSource ds = TestUtil.getDataSource(restoreAttrs); conn = ds.getConnection();
String dbName = "hairynosedwombat"; String connAttrs = "rollForwardRecoveryFrom=extinout/mybackup/hairynosedwombat"; conn = TestUtil.getConnection(dbName, connAttrs);
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...
"void", 1);
"void", 2);
void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation) { // add code to authorize statement execution. acb.pushThisAsActivation(mb); mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "getLanguageConnectionContext", ClassName.LanguageConnectionContext, 0); m...
protected void tearDown() throws SQLException {
protected void tearDown() throws Exception {
protected void tearDown() throws SQLException { conn.rollback(); conn.close(); }
super.tearDown(); conn = null;
protected void tearDown() throws SQLException { conn.rollback(); conn.close(); }
selectUpdateBlob("BlobTest #4",conn,selectBlob,_2GB,0,1,1); selectInsertBlob("BlobTest #4.1",conn,selectBlob,insertBlob,_2GB,0,3,1);
private static void blobTests(Connection conn) throws Exception { try { // Test - 2Gb blob ( actually it is 2gb -1) // Note with setBinaryStream interface the maximum size for the // stream, can be max value for an int. // Also note, that lobs in derby currently support...
selectUpdateBlob2("BlobTest #6",conn,selectBlob2,selectBlob,_100MB,0,1,1,DATAFILE);
private static void blobTests(Connection conn) throws Exception { try { // Test - 2Gb blob ( actually it is 2gb -1) // Note with setBinaryStream interface the maximum size for the // stream, can be max value for an int. // Also note, that lobs in derby currently support...
deleteTable(conn, deleteBlob, 2);
long _4GB = 4*1024*1024*(1024L); BlobImpl _4GbBlob = new BlobImpl(new RandomByteStream(new java.util.Random(),_4GB),_4GB);
private static void blobTests(Connection conn) throws Exception { try { // Test - 2Gb blob ( actually it is 2gb -1) // Note with setBinaryStream interface the maximum size for the // stream, can be max value for an int. // Also note, that lobs in derby currently support...
try { insertBlob_SetBlob("BlobTest #7 (setBlob with 4Gb blob",conn,insertBlob,_4GbBlob, _4GB,0,1,0); } catch(SQLException sqle) { System.out.println("DERBY DOES NOT SUPPORT INSERT OF 4GB BLOB "); expectedException(sqle); }
private static void blobTests(Connection conn) throws Exception { try { // Test - 2Gb blob ( actually it is 2gb -1) // Note with setBinaryStream interface the maximum size for the // stream, can be max value for an int. // Also note, that lobs in derby currently support...
RandomByteStream(java.util.Random dpr, int length) {
RandomByteStream(java.util.Random dpr, long length) {
RandomByteStream(java.util.Random dpr, int length) { this.length = length; this.dpr = dpr; }
try { if (ps != null) ps.close();
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
} catch (SQLException pse) {} errorInChain(e);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
private Connection getConnection () throws SQLException { return new TestConnection ().createEmbeddedConnection();
private Connection getConnection () throws Exception { ij.getPropertyArg( _startupArgs ); Connection conn_main = ij.startJBMS(); return conn_main;
private Connection getConnection () throws SQLException { return new TestConnection ().createEmbeddedConnection(); }
_startupArgs = args;
public static void main(String [] args) throws Exception { TestJDBC40Exception test = new TestJDBC40Exception (); test.testException (); }
return 3; } catch (NoSuchMethodException e) { return 2; } catch (NoClassDefFoundError e2) {
DatabaseMetaData meta = conn.getMetaData(); Method method = meta.getClass().getMethod("getJDBCMajorVersion", null); return ((Number) method.invoke(meta, null)).intValue(); } catch (Throwable t) {
public static int getJDBCMajorVersion(Connection conn) { try { conn.getClass().getMethod("setSavepoint", null); return 3; } catch (NoSuchMethodException e) { return 2; } catch (NoClassDefFoundError e2) { return 2; } }
session.setAttribute("answers", null);
public void addCheckBoxQuestionToSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialChars...
session.setAttribute("answers", null);
public void addNumericQuestionToSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialCharsC...
session.setAttribute("answers", null);
public void addStringListQuestionToSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialCha...
session.setAttribute("answers", null);
public void updateCheckBoxQuestionInSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialCh...
session.setAttribute("answers", null); session.setAttribute("columns", null);
public void updateMatrixQuestionInSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialChar...
session.setAttribute("answers", null);
public void updateNumericQuestionInSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecialCha...
public void updatePersistedSurvey(HttpServletRequest request,
public boolean updatePersistedSurvey(HttpServletRequest request,
public void updatePersistedSurvey(HttpServletRequest request, SurveyForm sform) { Survey survey; HttpSession session = request.getSession(); if (sform.getSectionName() != null && !sform.getSectionName().equals("")) survey = addSectionToSurvey(request, sform); else { survey = (Survey) session.getAttribute(...
surveyComponent.updateSurvey(survey);
try { surveyComponent.updateSurvey(survey); retValue = true; } catch(ConstraintViolationException cve){ log.info("Error al actualizar survey, por constraint: " + cve.getConstraintName()); } catch(RuntimeException e){ log.info("Error al actualizar survey: " + e.getMessage()); }
public void updatePersistedSurvey(HttpServletRequest request, SurveyForm sform) { Survey survey; HttpSession session = request.getSession(); if (sform.getSectionName() != null && !sform.getSectionName().equals("")) survey = addSectionToSurvey(request, sform); else { survey = (Survey) session.getAttribute(...
return retValue;
public void updatePersistedSurvey(HttpServletRequest request, SurveyForm sform) { Survey survey; HttpSession session = request.getSession(); if (sform.getSectionName() != null && !sform.getSectionName().equals("")) survey = addSectionToSurvey(request, sform); else { survey = (Survey) session.getAttribute(...
session.setAttribute("answers", null);
public void updateStringListQuestionInSection(HttpServletRequest request) { HttpSession session = request.getSession(); Section section = (Section) session.getAttribute("currentSection"); String name = Transformer.htmlEspecialCharsConverter(request .getParameter("name")); String image = Transformer.htmlEspecial...
return 0x00ff & oneChar;
if(oneChar <= 0x00ff) return oneChar; else return 0x003f;
public int read() throws java.io.IOException { int oneChar = reader_.read(); ++charsRead_; if (oneChar != -1) // if not eos { return 0x00ff & oneChar; } else { return -1; // end of stream } }
ps.setBytes(i+1, paramBytes);
ps.setBinaryStream(i+1, new ByteArrayInputStream(paramBytes), paramBytes.length);
private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR...
void initConnections()
public void initConnections()
void initConnections() { for (int ictr = 0; ictr < numConnections; ictr++) { try { connEnv[ictr].init(out); } catch (SQLException s) { JDBCDisplayUtil.ShowException(out, s); // will continue past connect failure } catch (ClassNotFoundException c) { JDBCDisplayUtil.ShowException(out, c); // will contin...
0, null);
0);
public NoPutResultSet materializeResultSetIfPossible(NoPutResultSet rs) throws StandardException { rs.openCore(); Vector rowCache = new Vector(); ExecRow aRow; int cacheSize = 0; FormatableBitSet toClone = null; int maxMemoryPerTable = getLanguageConnectionContext().getOptimizerFactory().getMaxMemoryPerTable();...
throw new java.lang.UnsupportedOperationException();
if (logWriter_ != null) { logWriter_.traceEntry(this, "addStatementEventListener", listener); } statementEventListeners.addElement(listener);
public void addStatementEventListener(StatementEventListener listener){ throw new java.lang.UnsupportedOperationException(); }
throw new java.lang.UnsupportedOperationException();
if (logWriter_ != null) { logWriter_.traceEntry(this, "removeConnectionEventListener", listener); } statementEventListeners.removeElement(listener);
public void removeStatementEventListener(StatementEventListener listener){ throw new java.lang.UnsupportedOperationException(); }
StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null);
StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null);
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null); try ...
if (SanityManager.DEBUG) SanityManager.ASSERT(serviceName.equals( storageFactory.getCanonicalName()), serviceName);
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null); try ...
return serviceDirectory.deleteAll() ? this : null;
if (serviceDirectory.exists()) { if (deleteExisting) { if (!serviceDirectory.deleteAll()) throw StandardException.newException(SQLState.SERVICE_DIRECTORY_REMOVE_ERROR, getDirectoryPath( name)); } else throw StandardException.newException(SQLState.SERVICE_DIRECTORY_EXISTS_ERROR, getDirectoryPath( name)); } if (serviceD...
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null); try ...
throws IOException, StandardException, InstantiationException, IllegalAccessException { WritableStorageFactory storageFactory = (WritableStorageFactory) privGetStorageFactoryInstance( true, serviceName, null, null); try
throws IOException, StandardException, InstantiationException, IllegalAccessException
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { WritableStorageFactory storageFactory = (W...
StorageFile cserviceProp = storageFactory.newStorageFile( PersistentService.PROPERTIES_NAME); if(cserviceProp.exists()) if(!cserviceProp.delete()) throw StandardException.newException(SQLState.UNABLE_TO_DELETE_FILE, cserviceProp); return null;
StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null); try { StorageFile serviceDirectory = storageFactory.newStorageFile( null); return serviceDirectory.exists() ? this : null; } finally {storageFactory.shutdown();}
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { WritableStorageFactory storageFactory = (W...
finally { storageFactory.shutdown();} }
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { WritableStorageFactory storageFactory = (W...
throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null); try { StorageFile serviceDirectory = storageFactory.newStorageFile( null);
throws IOException, StandardException, InstantiationException, IllegalAccessException { WritableStorageFactory storageFactory = (WritableStorageFactory) privGetStorageFactoryInstance( true, serviceName, null, null); try { StorageFile cserviceProp = storageFactory.newStorageFile( PersistentService.PROPERTIES_NAME);
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null); try ...
if (serviceDirectory.exists()) { if (deleteExisting) { if (!serviceDirectory.deleteAll()) throw StandardException.newException(SQLState.SERVICE_DIRECTORY_REMOVE_ERROR, getDirectoryPath( name));
if(cserviceProp.exists()) if(!cserviceProp.delete()) throw StandardException.newException(SQLState.UNABLE_TO_DELETE_FILE, cserviceProp); return null; } finally { storageFactory.shutdown();}
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null); try ...
else throw StandardException.newException(SQLState.SERVICE_DIRECTORY_EXISTS_ERROR, getDirectoryPath( name)); } if (serviceDirectory.mkdirs()) { try { return storageFactory.getCanonicalName(); } catch (IOException ioe) { serviceDirectory.deleteAll(); throw ioe; } } throw StandardException.newException(SQLState.SERVICE_...
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null); try ...
StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null);
StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null);
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null); try ...
return storageFactory.getCanonicalName();
if (SanityManager.DEBUG) SanityManager.ASSERT(serviceName.equals( storageFactory.getCanonicalName()), serviceName); StorageFile serviceDirectory = storageFactory.newStorageFile( null); return serviceDirectory.deleteAll() ? this : null;
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null); try ...
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null); try { StorageFile serviceDirectory = storageFactory.newStorageFile( null); return serviceDirectory.exists() ? this : ...
public Object run() throws StandardException { File servicePropertiesFile = new File(serviceName, PersistentService.PROPERTIES_NAME); if (replace) { backupFile = new File(serviceName, PersistentService.PROPERTIES_NAME.concat("old")); try { if(!servicePropertiesFile.renameTo(backupFile)) { throw StandardException.newEx...
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { StorageFactory storageFactory ...