zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #00364
[Merge] lp:~matthias-brantner/zorba/bug-863730 into lp:zorba
Matthias Brantner has proposed merging lp:~matthias-brantner/zorba/bug-863730 into lp:zorba.
Requested reviews:
Zorba Coders (zorba-coders)
Related bugs:
Bug #863730 in Zorba: "static delete-node* functions don't raise ZDDY0012"
https://bugs.launchpad.net/zorba/+bug/863730
For more details, see:
https://code.launchpad.net/~matthias-brantner/zorba/bug-863730/+merge/77772
Fix for bug #863730 (static delete-node* functions don't raise ZDDY0012).
--
https://code.launchpad.net/~matthias-brantner/zorba/bug-863730/+merge/77772
Your team Zorba Coders is requested to review the proposed merge of lp:~matthias-brantner/zorba/bug-863730 into lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2011-09-30 16:08:19 +0000
+++ ChangeLog 2011-10-01 00:19:27 +0000
@@ -38,6 +38,7 @@
* Fixed bug #855314 (should not fold a constant expr that returns an error item)
* Added ExternalFunctionParameter class to be registered in the DynamicContext
* Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator)
+ * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)
version 2.0.1
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2011-08-17 23:04:48 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2011-10-01 00:19:27 +0000
@@ -556,7 +556,7 @@
extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0011_COLLECTION_NODE_NOT_FOUND;
-extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0012_COLLECTION_UNORDERED_BAD_INSERT;
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION;
extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0013_COLLECTION_BAD_DESTROY_INDEXES;
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2011-09-16 21:58:20 +0000
+++ src/diagnostics/diagnostic_en.xml 2011-10-01 00:19:27 +0000
@@ -1909,8 +1909,8 @@
<value>"$1": collection does not contain node</value>
</diagnostic>
- <diagnostic code="ZDDY0012" name="COLLECTION_UNORDERED_BAD_INSERT">
- <value>"$1": illegal insert into unordered collection</value>
+ <diagnostic code="ZDDY0012" name="COLLECTION_UNORDERED_BAD_OPERATION">
+ <value>"$1": illegal $2 into unordered collection</value>
</diagnostic>
<diagnostic code="ZDDY0013" name="COLLECTION_BAD_DESTROY_INDEXES">
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2011-08-17 23:04:48 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2011-10-01 00:19:27 +0000
@@ -813,7 +813,7 @@
ZorbaErrorCode ZDDY0011_COLLECTION_NODE_NOT_FOUND( "ZDDY0011" );
-ZorbaErrorCode ZDDY0012_COLLECTION_UNORDERED_BAD_INSERT( "ZDDY0012" );
+ZorbaErrorCode ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION( "ZDDY0012" );
ZorbaErrorCode ZDDY0013_COLLECTION_BAD_DESTROY_INDEXES( "ZDDY0013" );
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2011-09-16 21:58:20 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2011-10-01 00:19:27 +0000
@@ -272,7 +272,7 @@
{ "ZDDY0009", "\"$1\": not all nodes to delete are at the beginning of this queue collection" },
{ "ZDDY0010", "\"$1\": illegal update of read-only nodes" },
{ "ZDDY0011", "\"$1\": collection does not contain node" },
- { "ZDDY0012", "\"$1\": illegal insert into unordered collection" },
+ { "ZDDY0012", "\"$1\": illegal $2 into unordered collection" },
{ "ZDDY0013", "\"$1\": can not delete collection because indexes reference it" },
{ "ZDDY0014", "\"$1\": can not delete collection because integrity constraints reference it" },
{ "ZDDY0015", "\"$1\": can not delete collection because there are references to its nodes" },
=== modified file 'src/runtime/collections/collections_impl.cpp'
--- src/runtime/collections/collections_impl.cpp 2011-09-16 13:26:06 +0000
+++ src/runtime/collections/collections_impl.cpp 2011-10-01 00:19:27 +0000
@@ -716,8 +716,8 @@
if (collectionDecl->getOrderProperty() == StaticContextConsts::decl_unordered)
{
throw XQUERY_EXCEPTION(
- zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_INSERT,
- ERROR_PARAMS( aName->getStringValue() ),
+ zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION,
+ ERROR_PARAMS( aName->getStringValue(), "insert" ),
ERROR_LOC( loc )
);
}
@@ -803,8 +803,8 @@
if (collectionDecl->getOrderProperty() == StaticContextConsts::decl_unordered)
{
throw XQUERY_EXCEPTION(
- zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_INSERT,
- ERROR_PARAMS( aName->getStringValue() ),
+ zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION,
+ ERROR_PARAMS( aName->getStringValue(), "insert" ),
ERROR_LOC( loc )
);
}
@@ -900,8 +900,8 @@
if (collectionDecl->getOrderProperty() == StaticContextConsts::decl_unordered)
{
throw XQUERY_EXCEPTION(
- zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_INSERT,
- ERROR_PARAMS( aName->getStringValue() ),
+ zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION,
+ ERROR_PARAMS( aName->getStringValue(), "insert" ),
ERROR_LOC( loc )
);
}
@@ -1574,6 +1574,15 @@
ERROR_LOC( aLoc )
);
}
+ if (collectionDecl &&
+ collectionDecl->getOrderProperty() == StaticContextConsts::decl_unordered)
+ {
+ throw XQUERY_EXCEPTION(
+ zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION,
+ ERROR_PARAMS( aName->getStringValue(), "delete" ),
+ ERROR_LOC(loc)
+ );
+ }
return collectionDecl;
}
@@ -1722,6 +1731,15 @@
ERROR_LOC( aLoc )
);
}
+ if (collectionDecl &&
+ collectionDecl->getOrderProperty() == StaticContextConsts::decl_unordered)
+ {
+ throw XQUERY_EXCEPTION(
+ zerr::ZDDY0012_COLLECTION_UNORDERED_BAD_OPERATION,
+ ERROR_PARAMS( aName->getStringValue(), "delete" ),
+ ERROR_LOC(loc)
+ );
+ }
return collectionDecl;
}
=== removed file 'test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t4.xml.res 2011-06-24 19:58:33 +0000
+++ test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t4.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wb>2</wb><wb>3</wb><wb>4</wb><wb>5</wb><wb>6</wb><wb>7</wb><wb>8</wb><wb>9</wb><wb>10</wb>
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t5.xml.res 2011-06-24 19:58:33 +0000
+++ test/rbkt/ExpQueryResults/zorba/xqddf/daniel/t5.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
\ No newline at end of file
=== added file 'test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_003.spec'
--- test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_003.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_003.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
=== added file 'test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_007.spec'
--- test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_007.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/delete_nodes_first/delete_nodes_collection_007.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,2 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
+
=== added file 'test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_003.spec'
--- test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_003.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_003.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
=== added file 'test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_007.spec'
--- test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_007.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/delete_nodes_last/delete_nodes_collection_007.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,2 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
+
=== added file 'test/rbkt/Queries/zorba/xqddf/daniel/t4.spec'
--- test/rbkt/Queries/zorba/xqddf/daniel/t4.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/xqddf/daniel/t4.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
=== added file 'test/rbkt/Queries/zorba/xqddf/daniel/t5.spec'
--- test/rbkt/Queries/zorba/xqddf/daniel/t5.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/xqddf/daniel/t5.spec 2011-10-01 00:19:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.zorba-xquery.com/errors:ZDDY0012
Follow ups