You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2007/05/03 14:42:58 UTC
svn commit: r534824 - in /db/derby/code/trunk/java:
engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java
testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
Author: rhillegas
Date: Thu May 3 05:42:57 2007
New Revision: 534824
URL: http://svn.apache.org/viewvc?view=rev&rev=534824
Log:
DERBY-2600: Committed Narayanan's RemoveTemporaryCode_v1.diff patch, taking out some code which short-circuited CLOB locator processing.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java?view=diff&rev=534824&r1=534823&r2=534824
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java Thu May 3 05:42:57 2007
@@ -161,14 +161,6 @@
*/
public static void CLOBSETSTRING(int LOCATOR, long pos, int length,
String str) throws SQLException {
- //Temporary code that will insert a clob with data into
- //the hashmap and will allow the testing of the locator
- //stored procedures.
- //This code will be removed once the set methods are implemented.
- java.util.HashMap hm = getEmbedConnection().getlobHMObj();
- EmbedClob clob = new EmbedClob(str, getEmbedConnection());
- hm.remove(new Integer(LOCATOR));
- hm.put(new Integer(LOCATOR), clob);
getClobObjectCorrespondingtoLOCATOR(LOCATOR).setString(pos, str, 0, length);
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java?view=diff&rev=534824&r1=534823&r2=534824
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java Thu May 3 05:42:57 2007
@@ -83,15 +83,7 @@
cs.setInt(2, 1);
cs.setLong(3, testStrLength);
cs.setString(4, testStr);
- try {
- cs.execute();
- }
- catch(SQLException sqle) {
- //expected Unsupported SQLException
- //The CLOBSETSTRING is not supported but contains
- //temporary code that shall be removed when
- //the method is enabled.
- }
+ cs.execute();
cs.close();
}
/**
@@ -226,12 +218,6 @@
* @throws SQLException.
*/
public void testClobSetStringSP() throws SQLException {
-
- //----------TO BE ENABLED LATER------------------------------
- //This code needs to be enabled once the set methods on the
- //Clob interface are implemented. Until that time keep checking
- //for a not implemented exception being thrown.
- /*
String newString = "123456789012345";
//initialize the locator to a default value.
int locator = -1;
@@ -271,41 +257,6 @@
if (newString.compareTo(retVal) != 0)
fail("SYSIBM.CLOBSETSTRING does not insert the right value");
cs.close();
- */
- //--------------TO BE ENABLED LATER--------------------------
-
-
- String newString = "123456789012345";
- //initialize the locator to a default value.
- int locator = -1;
- //call the stored procedure to return the created locator.
- CallableStatement cs = prepareCall
- ("? = CALL SYSIBM.CLOBCREATELOCATOR()");
- cs.registerOutParameter(1, java.sql.Types.INTEGER);
- cs.executeUpdate();
- locator = cs.getInt(1);
- cs.close();
-
- //use this new locator to test the SETSUBSTRING function
- //by inserting a new sub string and testing whether it has
- //been inserted properly.
-
- //Insert the new substring.
- cs = prepareCall("CALL SYSIBM.CLOBSETSTRING(?,?,?,?)");
- cs.setInt(1, locator);
- cs.setInt(2, 1);
- cs.setLong(3, newString.length());
- cs.setString(4, newString);
- try {
- cs.execute();
- }
- catch(SQLException sqle) {
- //expected Unsupported SQLException
- //The CLOBSETSTRING is not supported but contains
- //temporary code that shall be removed when
- //the method is enabled.
- }
- cs.close();
}
/**
@@ -378,15 +329,7 @@
cs.setInt(2, 1);
cs.setLong(3, newStr.length());
cs.setString(4, newStr);
- try {
- cs.execute();
- }
- catch(SQLException sqle) {
- //expected Unsupported SQLException
- //The CLOBSETSTRING is not supported but contains
- //temporary code that shall be removed when
- //the method is enabled.
- }
+ cs.execute();
cs.close();
cs = prepareCall