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 bp...@apache.org on 2006/08/08 17:53:30 UTC

svn commit: r429698 [2/2] - in /db/derby/code/trunk: java/engine/org/apache/derby/iapi/types/ java/engine/org/apache/derby/impl/sql/compile/ java/engine/org/apache/derby/impl/sql/execute/ java/engine/org/apache/derby/loc/ java/shared/org/apache/derby/s...

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java?rev=429698&r1=429697&r2=429698&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java Tue Aug  8 08:53:29 2006
@@ -336,29 +336,30 @@
             e.printStackTrace(System.out);
         }
 
-        // Test binding nulls to the XMLEXISTS operands.  Binding
+        // Test binding to the XMLEXISTS operands.  Binding
         // of the second (XML) operand is not allowed and was
-        // checked in "doBindTests()" above.  Here we just
-        // check binding of the first operand, which should be
-        // a string.
+        // checked in "doBindTests()" above.  Here we check
+        // binding of the first operand, which should fail
+        // because SQL/XML spec says the first operand must
+        // be a string literal.
         try {
 
+            System.out.print("Parameter as first operand in XMLEXISTS: ");
+
+            // If we're running in embedded mode or else with
+            // the Derby Client, then the next line will fail
+            // because there is NO deferred prepare.  If, however,
+            // we're running with JCC, the default is to defer
+            // the prepare until execution, so the next line will
+            // be fine, but the subsequent "execute" should fail.
             PreparedStatement pSt = conn.prepareStatement(
                 "select i from xTable.t1 where " +
                 "XMLEXISTS (? PASSING BY VALUE x)");
+            pSt.setString(1, "//*");
+            pSt.execute();
 
-            System.out.print("Binding string in XMLEXISTS: ");
-            bindAndExecute(pSt, 1, Types.CHAR, "//d48", null, false);
-
-            // Null should work, too.
-            System.out.print("Binding Java null string in XMLEXISTS: ");
-            bindAndExecute(pSt, 1, Types.CHAR, null, null, false);
-            System.out.print("Binding SQL NULL string in XMLEXISTS: ");
-            bindAndExecute(pSt, 1, Types.VARCHAR, null, null, true);
-
-        } catch (Exception e) {
-            System.out.println("Unexpected exception: ");
-            e.printStackTrace(System.out);
+        } catch (SQLException se) {
+            checkException(se, "X0X19");
         }
 
         System.out.println("\n[ End XMLEXISTS tests. ]\n");

Modified: db/derby/code/trunk/tools/jar/extraDBMSclasses.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/jar/extraDBMSclasses.properties?rev=429698&r1=429697&r2=429698&view=diff
==============================================================================
--- db/derby/code/trunk/tools/jar/extraDBMSclasses.properties (original)
+++ db/derby/code/trunk/tools/jar/extraDBMSclasses.properties Tue Aug  8 08:53:29 2006
@@ -84,4 +84,4 @@
 derby.module.store.urlf=org.apache.derby.impl.io.URLFile
 derby.module.store.cpf=org.apache.derby.impl.io.CPFile
 
-derby.module.xml.typec=org.apache.derby.impl.sql.compile.XMLTypeCompiler
+derby.module.xml.sqlxmle=org.apache.derby.impl.sql.execute.SqlXmlExecutor

Modified: db/derby/code/trunk/tools/jar/extraDBMStypes.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/jar/extraDBMStypes.properties?rev=429698&r1=429697&r2=429698&view=diff
==============================================================================
--- db/derby/code/trunk/tools/jar/extraDBMStypes.properties (original)
+++ db/derby/code/trunk/tools/jar/extraDBMStypes.properties Tue Aug  8 08:53:29 2006
@@ -13,3 +13,4 @@
 derby.module.type.m=org.apache.derby.impl.sql.compile.RefTypeCompiler
 derby.module.type.n=org.apache.derby.impl.sql.compile.TimeTypeCompiler
 derby.module.type.o=org.apache.derby.impl.sql.compile.TimestampTypeCompiler
+derby.module.type.p=org.apache.derby.impl.sql.compile.XMLTypeCompiler