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/23 05:03:32 UTC

svn commit: r433854 - in /db/derby/code/branches/10.2/java: engine/org/apache/derby/iapi/types/ engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derby...

Author: bpendleton
Date: Tue Aug 22 20:03:31 2006
New Revision: 433854

URL: http://svn.apache.org/viewvc?rev=433854&view=rev
Log:
DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

Merged from the trunk by svn merge -r 433449:433450 ../trunk

Originally submitted by Army Brown (qozinx@gmail.com)

Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xmlBinding.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xml_general.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xmlBinding.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java Tue Aug 22 20:03:31 2006
@@ -239,7 +239,7 @@
             // Something went wrong during compilation of the
             // expression; wrap the error and re-throw it.
             throw StandardException.newException(
-                SQLState.LANG_UNEXPECTED_XML_EXCEPTION, te);
+                SQLState.LANG_XML_QUERY_ERROR, te);
 
         }
     }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java Tue Aug 22 20:03:31 2006
@@ -377,7 +377,7 @@
 
         if (((XMLDataValue)source).getXType() != XML_DOC_ANY) {
             throw StandardException.newException(
-                SQLState.LANG_INVALID_XML_COLUMN_ASSIGN);
+                SQLState.LANG_NOT_AN_XML_DOCUMENT);
         }
 
         ((DataValueDescriptor) this).setValue(source);
@@ -559,7 +559,7 @@
         // Couldn't parse the XML document.  Throw a StandardException
         // with the parse exception nested in it.
             throw StandardException.newException(
-                SQLState.LANG_NOT_AN_XML_DOCUMENT, xe);
+                SQLState.LANG_INVALID_XML_DOCUMENT, xe);
         }
 
         // If we get here, the text is valid XML so go ahead
@@ -677,13 +677,13 @@
                 sqlxUtil.evalXQExpression(this, false, new int[1]));
 
         } catch (Exception xe) {
-        // We don't expect to get here.  Turn it into a StandardException
-        // (if needed), then throw it.
+        // Failed somewhere during evaluation of the XML query expression;
+        // turn error into a StandardException and throw it.
             if (xe instanceof StandardException)
                 throw (StandardException)xe;
             else {
                 throw StandardException.newException(
-                    SQLState.LANG_UNEXPECTED_XML_EXCEPTION, xe);
+                    SQLState.LANG_XML_QUERY_ERROR, xe, "XMLEXISTS");
             }
         }
     }
@@ -745,11 +745,10 @@
             throw se;
 
         } catch (Exception xe) {
-        // We don't expect to get here.  Turn it into a
-        // StandardException and throw it.
-
+        // Failed somewhere during evaluation of the XML query expression;
+        // turn error into a StandardException and throw it.
             throw StandardException.newException(
-                SQLState.LANG_UNEXPECTED_XML_EXCEPTION, xe);
+                SQLState.LANG_XML_QUERY_ERROR, xe, "XMLQUERY");
         }
     }
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties Tue Aug 22 20:03:31 2006
@@ -430,6 +430,8 @@
 01003=Null values were eliminated from the argument of a column function.
 0100E=XX Attempt to return too many result sets. 
 02000=No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
+# Next one is generic XQuery error per SQL/XML[2006]
+10000=Encountered error while evaluating XML query expression for {0} operator; see next exception for details.
 21000=Scalar subquery is only allowed to return a single row.
 22001=A truncation error was encountered trying to shrink {0} ''{1}'' to length {2}.
 54006=The length resulting from {0} operation is greater than {1}.
@@ -460,7 +462,13 @@
 22027=The built-in TRIM() function only supports a single trim character.  The LTRIM() and RTRIM() built-in functions support multiple trim characters.
 22028=The string exceeds the maximum length of {0}.
 22501=An ESCAPE clause of NULL returns undefined results and is not allowed.
-2200L=XMLPARSE operand is not an XML document; see next exception for details.
+
+## SQL/XML errors.
+2200L=Values assigned to XML columns must be well-formed DOCUMENT nodes.
+2200M=Failed to parse XMLPARSE operand; see next exception for details.
+2200V=Invalid context item for {0} operator; context items must be well-formed DOCUMENT nodes.
+# end SQL/XML errors.
+
 23502=Column ''{0}''  cannot accept a NULL value.
 23505=The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by ''{0}'' defined on ''{1}''.
 23503={2} on table ''{1}'' caused a violation of foreign key constraint ''{0}'' for key {3}.  The statement has been rolled back.
@@ -767,6 +775,19 @@
 
 42Z60={0} not allowed unless database property {1} has value ''{2}''.
 
+# Derby-specific XML compile errors (42Z70 - 42Z7Z)
+42Z70=Binding directly to an XML value is not allowed; try using XMLPARSE.
+42Z71=XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+42Z72=XML syntax error; missing keyword(s): ''{0}''.
+42Z73=Invalid target type for XMLSERIALIZE: ''{0}''.
+42Z74=XML feature not supported: ''{0}''.
+42Z75=XML query expression must be a string literal.
+42Z76=Multiple XML context items are not allowed.
+42Z77=Context item must have type ''XML''; ''{0}'' is not allowed.
+42Z78=Failed to locate ''{0}'' API or implementation classes.  XML operations are not permitted unless these classes are in your classpath.
+42Z79=Unable to determine the parameter type for XMLPARSE; try using a CAST.
+42Z7Z=Encountered unexpected error while processing XML; see next exception for details.
+
 ## More RUNTIMESTATISTICS messages
 42Z80.U=serializable
 42Z81.U=read committed
@@ -1029,21 +1050,6 @@
 X0X87.S=ResultSet.relative(int row) cannot be called when the cursor is not positioned on a row.
 X0X95.S=Operation ''{0}'' cannot be performed on object ''{1}'' because there is an open ResultSet dependent on that object.
 X0X99.S=Index ''{0}'' does not exist.
-
-# Derby-specific XML errors.
-X0X14.S=Binding directly to an XML value is not allowed; try using XMLPARSE.
-X0X15.S=XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
-X0X16.S=XML syntax error; missing keyword(s): ''{0}''.
-X0X17.S=Invalid target type for XMLSERIALIZE: ''{0}''.
-X0X18.S=XML feature not supported: ''{0}''.
-X0X19.S=XML query expression must be a string literal.
-X0X20.S=Multiple XML context items are not allowed.
-X0X21.S=Context item must have type ''XML''; ''{0}'' is not allowed.
-X0X22.S=Values assigned to XML columns must be well-formed DOCUMENT nodes.
-X0X23.S=Invalid context item for {0} operation; context items must be well-formed DOCUMENT nodes.
-X0X24.S=Failed to locate ''{0}'' API or implementation classes.  XML operations are not permitted unless these classes are in your classpath.
-X0X25.S=Unable to determine the parameter type for XMLPARSE; try using a CAST.
-X0XML.S=Encountered unexpected error while processing XML; see next exception for details.
 
 X0Y16.S=''{0}'' is not a view.  If it is a table, then use DROP TABLE instead.
 X0Y23.S=Operation ''{0}'' cannot be performed on object ''{1}'' because VIEW ''{2}'' is dependent on that object.

Modified: db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java (original)
+++ db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java Tue Aug 22 20:03:31 2006
@@ -119,7 +119,7 @@
 
 	<LI>Language
 	  <UL>
-		<LI> 2200J-2200R for SQL/XML errors (based on SQL/XML[2003]) </LI>
+		<LI> 2200J-2200R for SQL/XML errors (based on SQL/XML[2006]) </LI>
 		<LI> 42800-? for compatible DB2 errors
 		<LI> 42X00-42Zxx for compilation errors </LI>
 		<LI> 43X00-43Yxx  for org.apache.derby.impl.sql.execute.rts
@@ -576,7 +576,7 @@
 	** to the appropriate group. Language errors are divided into 3 groups:
 	** A group for standard SQLExceptions.
 	**
-	** 2200J-00R - For SQL/XML errors (based on SQL/XML[2003]).
+	** 2200J-00R - For SQL/XML errors (based on SQL/XML[2006]).
 	** 428?? - adding some DB2 compatible errors
 	** 42X00-42Zxx for compilation errors 
 	** 46000  for SQLJ errors (for now, leave this range empty)
@@ -698,10 +698,13 @@
 	String LANG_FK_VIOLATION                                           = "23503";
 	String LANG_CHECK_CONSTRAINT_VIOLATED                              = "23513";
 
-	// From SQL/XML[2003] spec; there are others, but
+	// From SQL/XML[2006] spec; there are others, but
 	// these are the ones we actually use with our
 	// current XML support.
+	String LANG_XML_QUERY_ERROR                                        = "10000";
 	String LANG_NOT_AN_XML_DOCUMENT                                    = "2200L";
+	String LANG_INVALID_XML_DOCUMENT                                   = "2200M";
+	String LANG_INVALID_XML_CONTEXT_ITEM                               = "2200V";
 
 	String LANG_INVALID_TRANSACTION_STATE                              = "25000";
     String CANNOT_CLOSE_ACTIVE_CONNECTION                              = "25001";
@@ -967,6 +970,20 @@
 
 	String LANG_GRANT_REVOKE_WITH_LEGACY_ACCESS                        = "42Z60";
 
+	// 42Z70 - 42Z7Z: For Derby-specific XML compilation errors
+	// (not defined by SQL/XML standard).
+	String LANG_ATTEMPT_TO_BIND_XML                                    = "42Z70";
+	String LANG_ATTEMPT_TO_SELECT_XML                                  = "42Z71";
+	String LANG_XML_KEYWORD_MISSING                                    = "42Z72";
+	String LANG_INVALID_XMLSERIALIZE_TYPE                              = "42Z73";
+	String LANG_UNSUPPORTED_XML_FEATURE                                = "42Z74";
+	String LANG_INVALID_XML_QUERY_EXPRESSION                           = "42Z75";
+	String LANG_MULTIPLE_XML_CONTEXT_ITEMS                             = "42Z76";
+	String LANG_INVALID_CONTEXT_ITEM_TYPE                              = "42Z77";
+	String LANG_MISSING_XML_CLASSES                                    = "42Z78";
+	String LANG_XMLPARSE_UNKNOWN_PARAM_TYPE                            = "42Z79";
+	String LANG_UNEXPECTED_XML_EXCEPTION                               = "42Z7Z";
+
 	String LANG_SERIALIZABLE										   = "42Z80.U";
 	String LANG_READ_COMMITTED										   = "42Z81.U";
 	String LANG_EXCLUSIVE											   = "42Z82.U";
@@ -1204,22 +1221,6 @@
 	String LANG_COLUMN_NAME_NOT_FOUND                                  = "X0X0F.S";
 
 	String LANG_INDEX_NOT_FOUND_DURING_EXECUTION                       = "X0X99.S";
-
-	// For Derby-specific XML errors (not defined by
-	// SQL/XML standard).
-	String LANG_ATTEMPT_TO_BIND_XML                                    = "X0X14.S";
-	String LANG_ATTEMPT_TO_SELECT_XML                                  = "X0X15.S";
-	String LANG_XML_KEYWORD_MISSING                                    = "X0X16.S";
-	String LANG_INVALID_XMLSERIALIZE_TYPE                              = "X0X17.S";
-	String LANG_UNSUPPORTED_XML_FEATURE                                = "X0X18.S";
-	String LANG_INVALID_XML_QUERY_EXPRESSION                           = "X0X19.S";
-	String LANG_MULTIPLE_XML_CONTEXT_ITEMS                             = "X0X20.S";
-	String LANG_INVALID_CONTEXT_ITEM_TYPE                              = "X0X21.S";
-	String LANG_INVALID_XML_COLUMN_ASSIGN                              = "X0X22.S";
-	String LANG_INVALID_XML_CONTEXT_ITEM                               = "X0X23.S";
-	String LANG_MISSING_XML_CLASSES                                    = "X0X24.S";
-	String LANG_XMLPARSE_UNKNOWN_PARAM_TYPE                            = "X0X25.S";
-	String LANG_UNEXPECTED_XML_EXCEPTION                               = "X0XML.S";
 
 	// X0Y01 used to be DUPLICATE_KEY_CONSTRAINT
 	String LANG_DROP_VIEW_ON_NON_VIEW                                  = "X0Y16.S";

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xmlBinding.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xmlBinding.out?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xmlBinding.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xmlBinding.out Tue Aug 22 20:03:31 2006
@@ -1,11 +1,11 @@
 [ Beginning XML binding tests. ]
-XML column -- bind String to XML: PASS -- caught expected error X0X14.
-XML column -- bind Java null to XML: PASS -- caught expected error X0X14.
-XML column -- bind SQL NULL to XML: PASS -- caught expected error X0X14.
-XML column -- bind integer to XML: PASS -- caught expected error X0X14.
-Trying to bind to XML in XMLSERIALIZE: PASS -- caught expected error X0X14.
-Trying to bind to XML in XMLEXISTS: PASS -- caught expected error X0X14.
-XML value in result set: PASS -- caught expected error X0X15.
+XML column -- bind String to XML: PASS -- caught expected error 42Z70.
+XML column -- bind Java null to XML: PASS -- caught expected error 42Z70.
+XML column -- bind SQL NULL to XML: PASS -- caught expected error 42Z70.
+XML column -- bind integer to XML: PASS -- caught expected error 42Z70.
+Trying to bind to XML in XMLSERIALIZE: PASS -- caught expected error 42Z70.
+Trying to bind to XML in XMLEXISTS: PASS -- caught expected error 42Z70.
+XML value in result set: PASS -- caught expected error 42Z71.
 [ End XML binding tests. ]
 [ Beginning XMLPARSE tests. ]
 Test insertions from file: 
@@ -44,6 +44,6 @@
 -----> Matching rows: 4
 Running XMLEXISTS with: //person/@noteTwo
 -----> Matching rows: 1
-Parameter as first operand in XMLEXISTS: PASS -- caught expected error X0X19.
+Parameter as first operand in XMLEXISTS: PASS -- caught expected error 42Z75.
 [ End XMLEXISTS tests. ]
 [ Done. ]

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xml_general.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xml_general.out?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xml_general.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/xml_general.out Tue Aug 22 20:03:31 2006
@@ -133,10 +133,10 @@
 ij> -- XML cannot be imported or exported.  These should all fail.
 CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (
   null, 'T1', 'xmlexport.del', null, null, null);
-ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY(
   'select x from t1', 'xmlexport.del', null, null, null);
-ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY (
   'select xmlserialize(x as clob) from t1',
   'xmlexport.del', null, null, null);
@@ -168,19 +168,19 @@
 ij> -- Test XMLPARSE operator.
 ----- These should fail.
 insert into t1 values (1, xmlparse(document '<hmm/>' strip whitespace));
-ERROR X0X18: XML feature not supported: 'STRIP WHITESPACE'.
+ERROR 42Z74: XML feature not supported: 'STRIP WHITESPACE'.
 ij> insert into t1 values (1, xmlparse(document '<hmm/>'));
-ERROR X0X16: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
 ij> insert into t1 values (1, xmlparse('<hmm/>' preserve whitespace));
-ERROR X0X16: XML syntax error; missing keyword(s): 'DOCUMENT'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'DOCUMENT'.
 ij> insert into t1 values (1, xmlparse(content '<hmm/>' preserve whitespace));
-ERROR X0X18: XML feature not supported: 'CONTENT'.
+ERROR 42Z74: XML feature not supported: 'CONTENT'.
 ij> select xmlparse(document xmlparse(document '<hein/>' preserve whitespace) preserve whitespace) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
 ij> select i from t1 where xmlparse(document '<hein/>' preserve whitespace);
 ERROR 42X19: The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'XML' expression.  It must be a BOOLEAN expression.
 ij> insert into t1 values (1, xmlparse(document '<oops>' preserve whitespace));
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> prepare ps1 as 'insert into t1(x) values XMLPARSE(document ? preserve whitespace)';
 ij> -- These should work.
 insert into t1 values (5, xmlparse(document '<hmm/>' preserve whitespace));
@@ -237,15 +237,15 @@
 3          
 ij> -- XML columns can't be returned in a top-level result set.
 select x from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select * from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select xmlparse(document vc preserve whitespace) from t4;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<bye/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<hel' | | 'lo/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- Test XMLSERIALIZE operator.
 insert into t4 values ('<hmm/>');
 1 row inserted/updated/deleted
@@ -253,13 +253,13 @@
 1 row inserted/updated/deleted
 ij> -- These should fail.
 select xmlserialize(x) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as int) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'INTEGER'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'INTEGER'.
 ij> select xmlserialize(x as varchar(20) for bit data) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
 ij> select xmlserialize(y as char(10)) from t1;
 ERROR 42X04: Column 'Y' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'Y' is not a column in the target table.
 ij> select xmlserialize(xmlserialize(x as clob) as clob) from t1;
@@ -304,7 +304,7 @@
 ij> -- These should succeed at the XMLEXISTS level, but fail with
 ----- parse/truncation errors.
 select xmlserialize(xmlparse(document vc preserve whitespace) as char(10)) from t4;
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'Content is not allowed in prolog.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'Content is not allowed in prolog.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(x as char) from t1;
 ERROR 22001: A truncation error was encountered trying to shrink CHAR '<update2> document was inserted as part of an UPDATE </updat&' to length 1.
 ij> select xmlserialize(x as clob(10)) from t1;
@@ -334,7 +334,7 @@
 select xmlserialize(xmlparse(document '<hmm>' preserve whitespace) as clob) from t2;
 1                                                                                                                               
 -----
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(xmlparse(document x preserve whitespace) as char(100)) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
 ij> -- These should succeed.
@@ -382,13 +382,13 @@
 ij> select i from t1 where xmlexists('//*' passing x);
 ERROR 42X01: Syntax error: Encountered "x" at line 1, column 48.
 ij> select i from t1 where xmlexists('//*' passing by value x);
-ERROR X0X18: XML feature not supported: 'BY VALUE'.
+ERROR 42Z74: XML feature not supported: 'BY VALUE'.
 ij> select i from t1 where xmlexists('//*' passing by ref i);
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i from t1 where xmlexists(i passing by ref x);
-ERROR X0X19: XML query expression must be a string literal.
+ERROR 42Z75: XML query expression must be a string literal.
 ij> select i from t1 where xmlexists(i passing by ref x, x);
-ERROR X0X20: Multiple XML context items are not allowed.
+ERROR 42Z76: Multiple XML context items are not allowed.
 ij> -- These should succeed.
 select i from t1 where xmlexists('//*' passing by ref x);
 I          
@@ -618,20 +618,20 @@
 ERROR 42X01: Syntax error: Encountered "returning" at line 1, column 35.
 ij> -- These should fail with "not supported" errors.
 select i, xmlquery('//*' passing by ref x returning sequence null on empty) from t1;
-ERROR X0X18: XML feature not supported: 'NULL ON EMPTY'.
+ERROR 42Z74: XML feature not supported: 'NULL ON EMPTY'.
 ij> select i, xmlquery('//*' passing by ref x returning content empty on empty) from t1;
-ERROR X0X18: XML feature not supported: 'RETURNING CONTENT'.
+ERROR 42Z74: XML feature not supported: 'RETURNING CONTENT'.
 ij> -- This should fail because XMLQUERY returns an XML value which
 ----- is not allowed in top-level result set.
 select i, xmlquery('//*' passing by ref x empty on empty) from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- These should fail because context item must be XML.
 select i, xmlquery('//*' passing by ref i empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i, xmlquery('//*' passing by ref 'hello' empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CHAR' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CHAR' is not allowed.
 ij> select i, xmlquery('//*' passing by ref cast ('hello' as clob) empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CLOB' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CLOB' is not allowed.
 ij> -- These should all succeed.  Since it's Xalan that's actually doing
 ----- the query evaluation we don't need to test very many queries; we
 ----- just want to make sure we get the correct results when there is
@@ -823,7 +823,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   21,
   (select
@@ -831,7 +831,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   22,
   (select
@@ -839,7 +839,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   23,
   (select
@@ -847,7 +847,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   24,
   (select
@@ -855,7 +855,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- These should succeed.
 insert into t2 (i, x) values (
   25,
@@ -951,11 +951,11 @@
 update t3
   set x = xmlquery('.//*' passing by ref x empty on empty)
 where i = 29;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x = xmlquery('./notthere' passing by ref x empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*[@weight]' passing by ref
@@ -966,7 +966,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*/@height' passing by ref
@@ -977,7 +977,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- Next two should succeed because there's no row with i = 100
 ----- in t3 and thus t3 should remain unchanged after these updates.
 update t3
@@ -1019,7 +1019,7 @@
     empty on empty)
   as char(100))
 from t1 where i > 5;
-ERROR X0X23: Invalid context item for XMLQUERY operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLQUERY operator; context items must be well-formed DOCUMENT nodes.
 ij> select i,
   xmlexists('.' passing by ref
     xmlquery('//lets/@*' passing by ref
@@ -1027,7 +1027,7 @@
     empty on empty)
   )
 from t1 where i > 5;
-ERROR X0X23: Invalid context item for XMLEXISTS operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLEXISTS operator; context items must be well-formed DOCUMENT nodes.
 ij> -- Should succeed but result is empty sequence.
 select i,
   xmlserialize(

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.out?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.out Tue Aug 22 20:03:31 2006
@@ -133,10 +133,10 @@
 ij> -- XML cannot be imported or exported.  These should all fail.
 CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (
   null, 'T1', 'xmlexport.del', null, null, null);
-ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY(
   'select x from t1', 'xmlexport.del', null, null, null);
-ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression. SQLSTATE: 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY (
   'select xmlserialize(x as clob) from t1',
   'xmlexport.del', null, null, null);
@@ -168,21 +168,21 @@
 ij> -- Test XMLPARSE operator.
 ----- These should fail.
 insert into t1 values (1, xmlparse(document '<hmm/>' strip whitespace));
-ERROR X0X18: XML feature not supported: 'STRIP WHITESPACE'.
+ERROR 42Z74: XML feature not supported: 'STRIP WHITESPACE'.
 ij> insert into t1 values (1, xmlparse(document '<hmm/>'));
-ERROR X0X16: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
 ij> insert into t1 values (1, xmlparse('<hmm/>' preserve whitespace));
-ERROR X0X16: XML syntax error; missing keyword(s): 'DOCUMENT'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'DOCUMENT'.
 ij> insert into t1 values (1, xmlparse(content '<hmm/>' preserve whitespace));
-ERROR X0X18: XML feature not supported: 'CONTENT'.
+ERROR 42Z74: XML feature not supported: 'CONTENT'.
 ij> select xmlparse(document xmlparse(document '<hein/>' preserve whitespace) preserve whitespace) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
 ij> select i from t1 where xmlparse(document '<hein/>' preserve whitespace);
 ERROR 42X19: The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'XML' expression.  It must be a BOOLEAN expression.
 ij> insert into t1 values (1, xmlparse(document '<oops>' preserve whitespace));
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> prepare ps1 as 'insert into t1(x) values XMLPARSE(document ? preserve whitespace)';
-ERROR X0X25: Unable to determine the parameter type for XMLPARSE; try using a CAST.
+ERROR 42Z79: Unable to determine the parameter type for XMLPARSE; try using a CAST.
 ij> -- These should work.
 insert into t1 values (5, xmlparse(document '<hmm/>' preserve whitespace));
 1 row inserted/updated/deleted
@@ -238,15 +238,15 @@
 3          
 ij> -- XML columns can't be returned in a top-level result set.
 select x from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select * from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select xmlparse(document vc preserve whitespace) from t4;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<bye/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<hel' | | 'lo/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- Test XMLSERIALIZE operator.
 insert into t4 values ('<hmm/>');
 1 row inserted/updated/deleted
@@ -254,13 +254,13 @@
 1 row inserted/updated/deleted
 ij> -- These should fail.
 select xmlserialize(x) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as int) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'INTEGER'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'INTEGER'.
 ij> select xmlserialize(x as varchar(20) for bit data) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
 ij> select xmlserialize(y as char(10)) from t1;
 ERROR 42X04: Column 'Y' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'Y' is not a column in the target table.
 ij> select xmlserialize(xmlserialize(x as clob) as clob) from t1;
@@ -305,7 +305,7 @@
 ij> -- These should succeed at the XMLEXISTS level, but fail with
 ----- parse/truncation errors.
 select xmlserialize(xmlparse(document vc preserve whitespace) as char(10)) from t4;
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'Content is not allowed in prolog.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'Content is not allowed in prolog.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(x as char) from t1;
 ERROR 22001: A truncation error was encountered trying to shrink CHAR '<update2> document was inserted as part of an UPDATE </updat&' to length 1.
 ij> select xmlserialize(x as clob(10)) from t1;
@@ -335,7 +335,7 @@
 select xmlserialize(xmlparse(document '<hmm>' preserve whitespace) as clob) from t2;
 1                                                                                                                               
 -----
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details. SQLSTATE: XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(xmlparse(document x preserve whitespace) as char(100)) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
 ij> -- These should succeed.
@@ -383,13 +383,13 @@
 ij> select i from t1 where xmlexists('//*' passing x);
 ERROR 42X01: Syntax error: Encountered "x" at line 1, column 48.
 ij> select i from t1 where xmlexists('//*' passing by value x);
-ERROR X0X18: XML feature not supported: 'BY VALUE'.
+ERROR 42Z74: XML feature not supported: 'BY VALUE'.
 ij> select i from t1 where xmlexists('//*' passing by ref i);
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i from t1 where xmlexists(i passing by ref x);
-ERROR X0X19: XML query expression must be a string literal.
+ERROR 42Z75: XML query expression must be a string literal.
 ij> select i from t1 where xmlexists(i passing by ref x, x);
-ERROR X0X20: Multiple XML context items are not allowed.
+ERROR 42Z76: Multiple XML context items are not allowed.
 ij> -- These should succeed.
 select i from t1 where xmlexists('//*' passing by ref x);
 I          
@@ -619,20 +619,20 @@
 ERROR 42X01: Syntax error: Encountered "returning" at line 1, column 35.
 ij> -- These should fail with "not supported" errors.
 select i, xmlquery('//*' passing by ref x returning sequence null on empty) from t1;
-ERROR X0X18: XML feature not supported: 'NULL ON EMPTY'.
+ERROR 42Z74: XML feature not supported: 'NULL ON EMPTY'.
 ij> select i, xmlquery('//*' passing by ref x returning content empty on empty) from t1;
-ERROR X0X18: XML feature not supported: 'RETURNING CONTENT'.
+ERROR 42Z74: XML feature not supported: 'RETURNING CONTENT'.
 ij> -- This should fail because XMLQUERY returns an XML value which
 ----- is not allowed in top-level result set.
 select i, xmlquery('//*' passing by ref x empty on empty) from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- These should fail because context item must be XML.
 select i, xmlquery('//*' passing by ref i empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i, xmlquery('//*' passing by ref 'hello' empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CHAR' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CHAR' is not allowed.
 ij> select i, xmlquery('//*' passing by ref cast ('hello' as clob) empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CLOB' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CLOB' is not allowed.
 ij> -- These should all succeed.  Since it's Xalan that's actually doing
 ----- the query evaluation we don't need to test very many queries; we
 ----- just want to make sure we get the correct results when there is
@@ -824,7 +824,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   21,
   (select
@@ -832,7 +832,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   22,
   (select
@@ -840,7 +840,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   23,
   (select
@@ -848,7 +848,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   24,
   (select
@@ -856,7 +856,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- These should succeed.
 insert into t2 (i, x) values (
   25,
@@ -952,11 +952,11 @@
 update t3
   set x = xmlquery('.//*' passing by ref x empty on empty)
 where i = 29;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x = xmlquery('./notthere' passing by ref x empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*[@weight]' passing by ref
@@ -967,7 +967,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*/@height' passing by ref
@@ -978,7 +978,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- Next two should succeed because there's no row with i = 100
 ----- in t3 and thus t3 should remain unchanged after these updates.
 update t3
@@ -1010,7 +1010,7 @@
     empty on empty)
   as char(100))
 from t1 where i > 5;
-ERROR X0X23: Invalid context item for XMLQUERY operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLQUERY operator; context items must be well-formed DOCUMENT nodes.
 ij> select i,
   xmlserialize(
     xmlquery('.' passing by ref
@@ -1020,7 +1020,7 @@
     empty on empty)
   as char(100))
 from t1 where i > 5;
-ERROR X0X23: Invalid context item for XMLQUERY operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLQUERY operator; context items must be well-formed DOCUMENT nodes.
 ij> select i,
   xmlexists('.' passing by ref
     xmlquery('//lets/@*' passing by ref
@@ -1028,7 +1028,7 @@
     empty on empty)
   )
 from t1 where i > 5;
-ERROR X0X23: Invalid context item for XMLEXISTS operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLEXISTS operator; context items must be well-formed DOCUMENT nodes.
 ij> -- Should succeed but result is empty sequence.
 select i,
   xmlserialize(

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xmlBinding.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xmlBinding.out?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xmlBinding.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xmlBinding.out Tue Aug 22 20:03:31 2006
@@ -1,8 +1,8 @@
 [ Beginning XML binding tests. ]
-XML column -- insertion via parameter:  PASS -- caught expected error X0X14.
-Trying to bind to XML in XMLSERIALIZE: PASS -- caught expected error X0X14.
-Trying to bind to XML in XMLEXISTS: PASS -- caught expected error X0X14.
-XML value in result set: PASS -- caught expected error X0X15.
+XML column -- insertion via parameter:  PASS -- caught expected error 42Z70.
+Trying to bind to XML in XMLSERIALIZE: PASS -- caught expected error 42Z70.
+Trying to bind to XML in XMLEXISTS: PASS -- caught expected error 42Z70.
+XML value in result set: PASS -- caught expected error 42Z71.
 [ End XML binding tests. ]
 [ Beginning XMLPARSE tests. ]
 Test insertions from file: 
@@ -41,6 +41,6 @@
 --> Matching rows: 4
 Running XMLEXISTS with: //person/@noteTwo
 --> Matching rows: 1
-Parameter as first operand in XMLEXISTS: PASS -- caught expected error X0X19.
+Parameter as first operand in XMLEXISTS: PASS -- caught expected error 42Z75.
 [ End XMLEXISTS tests. ]
 [ Done. ]

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out Tue Aug 22 20:03:31 2006
@@ -134,11 +134,11 @@
 CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (
   null, 'T1', 'xmlexport.del', null, null, null);
 ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression.
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY(
   'select x from t1', 'xmlexport.del', null, null, null);
 ERROR 38000: The exception 'java.sql.SQLException: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.' was thrown while evaluating an expression.
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY (
   'select xmlserialize(x as clob) from t1',
   'xmlexport.del', null, null, null);
@@ -170,22 +170,22 @@
 ij> -- Test XMLPARSE operator.
 -- These should fail.
 insert into t1 values (1, xmlparse(document '<hmm/>' strip whitespace));
-ERROR X0X18: XML feature not supported: 'STRIP WHITESPACE'.
+ERROR 42Z74: XML feature not supported: 'STRIP WHITESPACE'.
 ij> insert into t1 values (1, xmlparse(document '<hmm/>'));
-ERROR X0X16: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'PRESERVE WHITESPACE'.
 ij> insert into t1 values (1, xmlparse('<hmm/>' preserve whitespace));
-ERROR X0X16: XML syntax error; missing keyword(s): 'DOCUMENT'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'DOCUMENT'.
 ij> insert into t1 values (1, xmlparse(content '<hmm/>' preserve whitespace));
-ERROR X0X18: XML feature not supported: 'CONTENT'.
+ERROR 42Z74: XML feature not supported: 'CONTENT'.
 ij> select xmlparse(document xmlparse(document '<hein/>' preserve whitespace) preserve whitespace) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
 ij> select i from t1 where xmlparse(document '<hein/>' preserve whitespace);
 ERROR 42X19: The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'XML' expression.  It must be a BOOLEAN expression.
 ij> insert into t1 values (1, xmlparse(document '<oops>' preserve whitespace));
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details.
 ERROR XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> prepare ps1 as 'insert into t1(x) values XMLPARSE(document ? preserve whitespace)';
-ERROR X0X25: Unable to determine the parameter type for XMLPARSE; try using a CAST.
+ERROR 42Z79: Unable to determine the parameter type for XMLPARSE; try using a CAST.
 ij> -- These should work.
 insert into t1 values (5, xmlparse(document '<hmm/>' preserve whitespace));
 1 row inserted/updated/deleted
@@ -241,15 +241,15 @@
 3          
 ij> -- XML columns can't be returned in a top-level result set.
 select x from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select * from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> select xmlparse(document vc preserve whitespace) from t4;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<bye/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> values xmlparse(document '<hel' || 'lo/>' preserve whitespace);
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- Test XMLSERIALIZE operator.
 insert into t4 values ('<hmm/>');
 1 row inserted/updated/deleted
@@ -257,13 +257,13 @@
 1 row inserted/updated/deleted
 ij> -- These should fail.
 select xmlserialize(x) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as) from t1;
-ERROR X0X16: XML syntax error; missing keyword(s): 'AS'.
+ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
 ij> select xmlserialize(x as int) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'INTEGER'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'INTEGER'.
 ij> select xmlserialize(x as varchar(20) for bit data) from t1;
-ERROR X0X17: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
+ERROR 42Z73: Invalid target type for XMLSERIALIZE: 'VARCHAR () FOR BIT DATA'.
 ij> select xmlserialize(y as char(10)) from t1;
 ERROR 42X04: Column 'Y' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'Y' is not a column in the target table.
 ij> select xmlserialize(xmlserialize(x as clob) as clob) from t1;
@@ -311,7 +311,7 @@
 1         
 ----------
 <hmm/>    
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details.
 ERROR XJ001: Java exception: 'Content is not allowed in prolog.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(x as char) from t1;
 1   
@@ -352,7 +352,7 @@
 select xmlserialize(xmlparse(document '<hmm>' preserve whitespace) as clob) from t2;
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
-ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details.
+ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details.
 ERROR XJ001: Java exception: 'XML document structures must start and end within the same entity.: xxxFILTERED-SAX-EXCEPTIONxxx'.
 ij> select xmlserialize(xmlparse(document x preserve whitespace) as char(100)) from t1;
 ERROR 42X25: The 'XMLParse' function is not allowed on the 'XML' type.
@@ -401,13 +401,13 @@
 ij> select i from t1 where xmlexists('//*' passing x);
 ERROR 42X01: Syntax error: Encountered "x" at line 1, column 48.
 ij> select i from t1 where xmlexists('//*' passing by value x);
-ERROR X0X18: XML feature not supported: 'BY VALUE'.
+ERROR 42Z74: XML feature not supported: 'BY VALUE'.
 ij> select i from t1 where xmlexists('//*' passing by ref i);
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i from t1 where xmlexists(i passing by ref x);
-ERROR X0X19: XML query expression must be a string literal.
+ERROR 42Z75: XML query expression must be a string literal.
 ij> select i from t1 where xmlexists(i passing by ref x, x);
-ERROR X0X20: Multiple XML context items are not allowed.
+ERROR 42Z76: Multiple XML context items are not allowed.
 ij> -- These should succeed.
 select i from t1 where xmlexists('//*' passing by ref x);
 I          
@@ -637,20 +637,20 @@
 ERROR 42X01: Syntax error: Encountered "returning" at line 1, column 35.
 ij> -- These should fail with "not supported" errors.
 select i, xmlquery('//*' passing by ref x returning sequence null on empty) from t1;
-ERROR X0X18: XML feature not supported: 'NULL ON EMPTY'.
+ERROR 42Z74: XML feature not supported: 'NULL ON EMPTY'.
 ij> select i, xmlquery('//*' passing by ref x returning content empty on empty) from t1;
-ERROR X0X18: XML feature not supported: 'RETURNING CONTENT'.
+ERROR 42Z74: XML feature not supported: 'RETURNING CONTENT'.
 ij> -- This should fail because XMLQUERY returns an XML value which
 -- is not allowed in top-level result set.
 select i, xmlquery('//*' passing by ref x empty on empty) from t1;
-ERROR X0X15: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
+ERROR 42Z71: XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
 ij> -- These should fail because context item must be XML.
 select i, xmlquery('//*' passing by ref i empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'INTEGER' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'INTEGER' is not allowed.
 ij> select i, xmlquery('//*' passing by ref 'hello' empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CHAR' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CHAR' is not allowed.
 ij> select i, xmlquery('//*' passing by ref cast ('hello' as clob) empty on empty) from t1;
-ERROR X0X21: Context item must have type 'XML'; 'CLOB' is not allowed.
+ERROR 42Z77: Context item must have type 'XML'; 'CLOB' is not allowed.
 ij> -- These should all succeed.  Since it's Xalan that's actually doing
 -- the query evaluation we don't need to test very many queries; we
 -- just want to make sure we get the correct results when there is
@@ -842,7 +842,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   21,
   (select
@@ -850,7 +850,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   22,
   (select
@@ -858,7 +858,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   23,
   (select
@@ -866,7 +866,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> insert into t2 (i, x) values (
   24,
   (select
@@ -874,7 +874,7 @@
     from t1 where i = 9
   )
 );
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- These should succeed.
 insert into t2 (i, x) values (
   25,
@@ -970,11 +970,11 @@
 update t3
   set x = xmlquery('.//*' passing by ref x empty on empty)
 where i = 29;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x = xmlquery('./notthere' passing by ref x empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*[@weight]' passing by ref
@@ -985,7 +985,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> update t3
   set x =
     xmlquery('//*/@height' passing by ref
@@ -996,7 +996,7 @@
       )
     empty on empty)
 where i = 30;
-ERROR X0X22: Values assigned to XML columns must be well-formed DOCUMENT nodes.
+ERROR 2200L: Values assigned to XML columns must be well-formed DOCUMENT nodes.
 ij> -- Next two should succeed because there's no row with i = 100
 -- in t3 and thus t3 should remain unchanged after these updates.
 update t3
@@ -1030,7 +1030,7 @@
 from t1 where i > 5;
 I          |2                                                                                                   
 ----------------------------------------------------------------------------------------------------------------
-ERROR X0X23: Invalid context item for XMLQUERY operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLQUERY operator; context items must be well-formed DOCUMENT nodes.
 ij> select i,
   xmlserialize(
     xmlquery('.' passing by ref
@@ -1042,7 +1042,7 @@
 from t1 where i > 5;
 I          |2                                                                                                   
 ----------------------------------------------------------------------------------------------------------------
-ERROR X0X23: Invalid context item for XMLQUERY operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLQUERY operator; context items must be well-formed DOCUMENT nodes.
 ij> select i,
   xmlexists('.' passing by ref
     xmlquery('//lets/@*' passing by ref
@@ -1052,7 +1052,7 @@
 from t1 where i > 5;
 I          |2    
 -----------------
-ERROR X0X23: Invalid context item for XMLEXISTS operation; context items must be well-formed DOCUMENT nodes.
+ERROR 2200V: Invalid context item for XMLEXISTS operator; context items must be well-formed DOCUMENT nodes.
 ij> -- Should succeed but result is empty sequence.
 select i,
   xmlserialize(

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java?rev=433854&r1=433853&r2=433854&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xmlBinding.java Tue Aug 22 20:03:31 2006
@@ -126,21 +126,21 @@
                 "insert into xTable.t1(x) values (?)");
 
             System.out.print("XML column -- bind String to XML: ");
-            bindAndExecute(pSt, 1, Types.VARCHAR, "shouldn't work", "X0X14", false);
+            bindAndExecute(pSt, 1, Types.VARCHAR, "shouldn't work", "42Z70", false);
 
             System.out.print("XML column -- bind Java null to XML: ");
-               bindAndExecute(pSt, 1, Types.VARCHAR, null, "X0X14", false);
+               bindAndExecute(pSt, 1, Types.VARCHAR, null, "42Z70", false);
 
             System.out.print("XML column -- bind SQL NULL to XML: ");
-            bindAndExecute(pSt, 1, Types.VARCHAR, null, "X0X14", true);
+            bindAndExecute(pSt, 1, Types.VARCHAR, null, "42Z70", true);
 
             System.out.print("XML column -- bind integer to XML: ");
-            bindAndExecute(pSt, 1, Types.INTEGER, new Integer(8), "X0X14", false);
+            bindAndExecute(pSt, 1, Types.INTEGER, new Integer(8), "42Z70", false);
 
         } catch (SQLException se) {
             // Must be running with embedded or Derby Network Client.
             System.out.print("XML column -- insertion via parameter:  ");
-            checkException(se, "X0X14");
+            checkException(se, "42Z70");
         }
 
         // Binding to an XML value in the XMLSERIALIZE operator.
@@ -150,9 +150,9 @@
         try {
             pSt = conn.prepareStatement(
                 "select XMLSERIALIZE(? AS CLOB) FROM XTABLE.T1");
-            bindAndExecute(pSt, 1, Types.VARCHAR, null, "X0X14", true);
+            bindAndExecute(pSt, 1, Types.VARCHAR, null, "42Z70", true);
         } catch (SQLException se) {
-            checkException(se, "X0X14");
+            checkException(se, "42Z70");
         }
 
         // Binding to an XML value in the XMLEXISTS operator.
@@ -163,9 +163,9 @@
             pSt = conn.prepareStatement(
                 "select i from xTable.t1 where " +
                 "XMLEXISTS('//*' PASSING BY REF ?)");
-            bindAndExecute(pSt, 1, Types.VARCHAR, null, "X0X14", true);
+            bindAndExecute(pSt, 1, Types.VARCHAR, null, "42Z70", true);
         } catch (SQLException se) {
-            checkException(se, "X0X14");
+            checkException(se, "42Z70");
         }
 
         // Make sure that attempts to bind _from_ XML will fail.
@@ -176,7 +176,7 @@
             pSt = conn.prepareStatement("select x from xTable.t1");
             pSt.execute();
         } catch (SQLException se) {
-            checkException(se, "X0X15");
+            checkException(se, "42Z71");
         }
 
         System.out.println("\n[ End XML binding tests. ]\n");
@@ -360,7 +360,7 @@
             pSt.execute();
 
         } catch (SQLException se) {
-            checkException(se, "X0X19");
+            checkException(se, "42Z75");
         }
 
         System.out.println("\n[ End XMLEXISTS tests. ]\n");