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 an...@apache.org on 2006/07/10 16:17:11 UTC
svn commit: r420535 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests:
master/DerbyNet/forupdate.out master/DerbyNetClient/forupdate.out
tests/lang/forupdate_sed.properties
Author: andreask
Date: Mon Jul 10 07:17:10 2006
New Revision: 420535
URL: http://svn.apache.org/viewvc?rev=420535&view=rev
Log:
DERBY-1351 lang/forupdate fails with invalid cursorname. Sed used to filter cursorname. Contributed by Fernanda Pizzorno
Added:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties (with props)
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out?rev=420535&r1=420534&r2=420535&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out Mon Jul 10 07:17:10 2006
@@ -43,7 +43,7 @@
----- with a 'cursor not updatable' message
get cursor c as 'select i, v from t1, t2';
ij> delete from t1 where current of c;
-ERROR 42X23: Cursor SQL_CURSH200C1 is not updatable.
+ERROR 42X23: Cursor <xxx-cursor-name-xxx> is not updatable.
ij> -- cursor with same name already exists
get cursor c as 'select i, v from t1, t2';
ERROR (no SQLState): Duplicate cursor names are not allowed.
@@ -62,13 +62,13 @@
----- we know because the delete is refused with a 'cursor not updatable' message
get cursor c2 as 'select i, v from t1, t2 for read only';
ij> delete from t1 where current of c2;
-ERROR 42X23: Cursor SQL_CURSH200C1 is not updatable.
+ERROR 42X23: Cursor <xxx-cursor-name-xxx> is not updatable.
ij> close c2;
ij> -- . read only for updatable cursor spec
----- we know because the delete is refused with a 'cursor not updatable' message
get cursor c3 as 'select i, v from t1 where i is not null for read only';
ij> delete from t1 where current of c3;
-ERROR 42X23: Cursor SQL_CURSH200C1 is not updatable.
+ERROR 42X23: Cursor <xxx-cursor-name-xxx> is not updatable.
ij> close c3;
ij> -- . for update col not in select list
----- this is allowed:
@@ -133,7 +133,7 @@
1
ij> -- this will get a target table mismatch error, it uses the correlation name:
delete from s1 where current of c4;
-ERROR 42X28: Delete table 'S1' is not target of cursor 'SQL_CURSH200C1'.
+ERROR 42X28: Delete table 'S1' is not target of cursor '<xxx-cursor-name-xxx>'.
ij> -- this will compile and succeed, it uses the table name:
delete from t1 where current of c4;
1 row inserted/updated/deleted
@@ -223,7 +223,7 @@
1
-----
Statement Name:
- SQL_CURSH200C1
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 FOR UPDATE
Parse Time: 0
@@ -268,7 +268,7 @@
1
-----
Statement Name:
- SQL_CURSH200C1
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where i = ? FOR UPDATE
Parse Time: 0
@@ -334,7 +334,7 @@
1
-----
Statement Name:
- SQL_CURSH200C3
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where i < ? FOR UPDATE
Parse Time: 0
@@ -394,7 +394,7 @@
1
-----
Statement Name:
- SQL_CURSH200C3
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where b = ? FOR UPDATE
Parse Time: 0
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out?rev=420535&r1=420534&r2=420535&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out Mon Jul 10 07:17:10 2006
@@ -43,7 +43,7 @@
----- with a 'cursor not updatable' message
get cursor c as 'select i, v from t1, t2';
ij> delete from t1 where current of c;
-ERROR 42X30: Cursor 'SQL_CURLH000C1' not found. Verify that autocommit is OFF.
+ERROR 42X30: Cursor '<xxx-cursor-name-xxx>' not found. Verify that autocommit is OFF.
ij> -- cursor with same name already exists
get cursor c as 'select i, v from t1, t2';
ERROR XJ203: Cursor name 'C' is already in use
@@ -56,19 +56,19 @@
ij> -- the delete will get a 'cursor not updatable' execution error, but won't get
----- a compile time error
delete from t1 where current of c1;
-ERROR 42X30: Cursor 'SQL_CURLH000C1' not found. Verify that autocommit is OFF.
+ERROR 42X30: Cursor '<xxx-cursor-name-xxx>' not found. Verify that autocommit is OFF.
ij> close c1;
ij> -- . read only for read only cursor spec
----- we know because the delete is refused with a 'cursor not updatable' message
get cursor c2 as 'select i, v from t1, t2 for read only';
ij> delete from t1 where current of c2;
-ERROR 42X30: Cursor 'SQL_CURLH000C1' not found. Verify that autocommit is OFF.
+ERROR 42X30: Cursor '<xxx-cursor-name-xxx>' not found. Verify that autocommit is OFF.
ij> close c2;
ij> -- . read only for updatable cursor spec
----- we know because the delete is refused with a 'cursor not updatable' message
get cursor c3 as 'select i, v from t1 where i is not null for read only';
ij> delete from t1 where current of c3;
-ERROR 42X30: Cursor 'SQL_CURLH000C1' not found. Verify that autocommit is OFF.
+ERROR 42X30: Cursor '<xxx-cursor-name-xxx>' not found. Verify that autocommit is OFF.
ij> close c3;
ij> -- . for update col not in select list
----- this is allowed:
@@ -133,7 +133,7 @@
1
ij> -- this will get a target table mismatch error, it uses the correlation name:
delete from s1 where current of c4;
-ERROR 42X28: Delete table 'S1' is not target of cursor 'SQL_CURLH000C1'.
+ERROR 42X28: Delete table 'S1' is not target of cursor '<xxx-cursor-name-xxx>'.
ij> -- this will compile and succeed, it uses the table name:
delete from t1 where current of c4;
1 row inserted/updated/deleted
@@ -223,7 +223,7 @@
1
-----
Statement Name:
- SQL_CURLH000C1
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 FOR UPDATE
Parse Time: 0
@@ -268,7 +268,7 @@
1
-----
Statement Name:
- SQL_CURLH000C1
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where i = ? FOR UPDATE
Parse Time: 0
@@ -334,7 +334,7 @@
1
-----
Statement Name:
- SQL_CURLH000C3
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where i < ? FOR UPDATE
Parse Time: 0
@@ -394,7 +394,7 @@
1
-----
Statement Name:
- SQL_CURLH000C3
+ <xxx-cursor-name-xxx>
Statement Text:
select i, b from t3 where b = ? FOR UPDATE
Parse Time: 0
Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties?rev=420535&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties Mon Jul 10 07:17:10 2006
@@ -0,0 +1,11 @@
+# Filters and substitutes for SED
+# Multiple patterns for DELETE: comma separated
+# delete=pattern1,pattern2,...,patternn
+# No commas can be allowed in the patterns.
+#
+# Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
+# substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
+# No commas or semicolons can be allowed in the patterns/subsitutes.
+---------------------------------------------------------------------------------
+# cursor names appear to change
+substitute=SQL_CURLH[0-9][0-9][0-9]C[0-9];<xxx-cursor-name-xxx>,SQL_CURSH[0-9][0-9][0-9]C[0-9];<xxx-cursor-name-xxx>
\ No newline at end of file
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate_sed.properties
------------------------------------------------------------------------------
svn:eol-style = native