Merge lp:~zorba-coders/zorba/bug-867253 into lp:zorba

Proposed by Matthias Brantner
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10754
Merged at revision: 10762
Proposed branch: lp:~zorba-coders/zorba/bug-867253
Merge into: lp:zorba
Diff against target: 182 lines (+49/-27)
7 files modified
ChangeLog (+1/-0)
include/zorba/pregenerated/diagnostic_list.h (+6/-4)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+12/-8)
src/diagnostics/diagnostic_en.xml (+11/-8)
src/diagnostics/pregenerated/diagnostic_list.cpp (+9/-6)
src/diagnostics/pregenerated/dict_en.cpp (+1/-0)
src/runtime/collections/collections_impl.cpp (+9/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-867253
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
David Graf (community) Approve
Review via email: mp+101693@code.launchpad.net

Commit message

fix for bug #867253 (cdml:delete-nodes should only remove root nodes)

Description of the change

fix for bug #867253 (cdml:delete-nodes should only remove root nodes)

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-867253-2012-04-12T07-56-58.111Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Pending.

Revision history for this message
David Graf (davidagraf) wrote :

Reviewed the code and tests an example. Looks good!

review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-867253-2012-04-14T05-36-59.424Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2012-04-10 15:41:57 +0000
+++ ChangeLog 2012-04-12 07:56:20 +0000
@@ -13,6 +13,7 @@
13 * Fixed bug #967864 (var substitution did not update theFreeVars property)13 * Fixed bug #967864 (var substitution did not update theFreeVars property)
14 * Fixed bug in window iterator (binding the end vars in the output tuple stream)14 * Fixed bug in window iterator (binding the end vars in the output tuple stream)
15 * Fixed bug #866547 (protect index-join rule from general flwor)15 * Fixed bug #866547 (protect index-join rule from general flwor)
16 * Fixed bug #867253 (cdml:delete-nodes should only remove root nodes)
16 * Fixed bug #967428 (do not hoist index creation outside a try-catch)17 * Fixed bug #967428 (do not hoist index creation outside a try-catch)
17 * Fixed performance problem with the findNodeSources function of the no-copy rule18 * Fixed performance problem with the findNodeSources function of the no-copy rule
18 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)19 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)
1920
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2012-03-28 05:19:57 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2012-04-12 07:56:20 +0000
@@ -606,16 +606,18 @@
606606
607extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0030_INDEX_RANGE_GENERAL_PROBE_NOT_ALLOWED;607extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0030_INDEX_RANGE_GENERAL_PROBE_NOT_ALLOWED;
608608
609extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES;
610
611extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT;
612
613extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0031_IC_NOT_DECLARED;609extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0031_IC_NOT_DECLARED;
614610
615extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0032_IC_NOT_ACTIVATED;611extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0032_IC_NOT_ACTIVATED;
616612
617extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0033_IC_NOT_MET;613extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0033_IC_NOT_MET;
618614
615extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES;
616
617extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT;
618
619extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0036_NON_ROOT_NODE_DELETION;
620
619extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED;621extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED;
620622
621extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED;623extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED;
622624
=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq'
--- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-03-28 05:19:57 +0000
+++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-04-12 07:56:20 +0000
@@ -513,14 +513,6 @@
513513
514(:~514(:~
515:)515:)
516declare variable $zerr:ZDDY0034 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0034");
517
518(:~
519:)
520declare variable $zerr:ZDDY0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0035");
521
522(:~
523:)
524declare variable $zerr:ZDDY0031 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0031");516declare variable $zerr:ZDDY0031 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0031");
525517
526(:~518(:~
@@ -533,6 +525,18 @@
533525
534(:~526(:~
535:)527:)
528declare variable $zerr:ZDDY0034 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0034");
529
530(:~
531:)
532declare variable $zerr:ZDDY0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0035");
533
534(:~
535:)
536declare variable $zerr:ZDDY0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0036");
537
538(:~
539:)
536declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001");540declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001");
537541
538(:~542(:~
539543
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-03-28 05:19:57 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-04-12 07:56:20 +0000
@@ -2069,14 +2069,6 @@
2069 <value>"$1": index range-general probe not allowed</value>2069 <value>"$1": index range-general probe not allowed</value>
2070 </diagnostic>2070 </diagnostic>
20712071
2072 <diagnostic code="ZDDY0034" name="INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES">
2073 <value>"$1": index range-value probe has search keys with incompatible types</value>
2074 </diagnostic>
2075
2076 <diagnostic code="ZDDY0035" name="INDEX_GENERAL_INSERT">
2077 <value>"$1": index inserting more than one key not allowed for general index</value>
2078 </diagnostic>
2079
2080 <diagnostic code="ZDDY0031" name="IC_NOT_DECLARED">2072 <diagnostic code="ZDDY0031" name="IC_NOT_DECLARED">
2081 <value>"$1": integrity constraint is not declared</value>2073 <value>"$1": integrity constraint is not declared</value>
2082 </diagnostic>2074 </diagnostic>
@@ -2089,6 +2081,17 @@
2089 <value>"$1": integrity constraint not met for collection "$2"</value>2081 <value>"$1": integrity constraint not met for collection "$2"</value>
2090 </diagnostic>2082 </diagnostic>
20912083
2084 <diagnostic code="ZDDY0034" name="INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES">
2085 <value>"$1": index range-value probe has search keys with incompatible types</value>
2086 </diagnostic>
2087
2088 <diagnostic code="ZDDY0035" name="INDEX_GENERAL_INSERT">
2089 <value>"$1": index inserting more than one key not allowed for general index</value>
2090 </diagnostic>
2091
2092 <diagnostic code="ZDDY0036" name="NON_ROOT_NODE_DELETION">
2093 <value>attempt to delete non-root node from collection "$1"</value>
2094 </diagnostic>
20922095
2093 <diagnostic code="ZDST0001" name="COLLECTION_ALREADY_DECLARED">2096 <diagnostic code="ZDST0001" name="COLLECTION_ALREADY_DECLARED">
2094 <value>"$1": collection already declared</value>2097 <value>"$1": collection already declared</value>
20952098
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-03-28 05:19:57 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-04-12 07:56:20 +0000
@@ -888,12 +888,6 @@
888ZorbaErrorCode ZDDY0030_INDEX_RANGE_GENERAL_PROBE_NOT_ALLOWED( "ZDDY0030" );888ZorbaErrorCode ZDDY0030_INDEX_RANGE_GENERAL_PROBE_NOT_ALLOWED( "ZDDY0030" );
889889
890890
891ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES( "ZDDY0034" );
892
893
894ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT( "ZDDY0035" );
895
896
897ZorbaErrorCode ZDDY0031_IC_NOT_DECLARED( "ZDDY0031" );891ZorbaErrorCode ZDDY0031_IC_NOT_DECLARED( "ZDDY0031" );
898892
899893
@@ -903,6 +897,15 @@
903ZorbaErrorCode ZDDY0033_IC_NOT_MET( "ZDDY0033" );897ZorbaErrorCode ZDDY0033_IC_NOT_MET( "ZDDY0033" );
904898
905899
900ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES( "ZDDY0034" );
901
902
903ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT( "ZDDY0035" );
904
905
906ZorbaErrorCode ZDDY0036_NON_ROOT_NODE_DELETION( "ZDDY0036" );
907
908
906ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED( "ZDST0001" );909ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED( "ZDST0001" );
907910
908911
909912
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2012-03-28 05:19:57 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2012-04-12 07:56:20 +0000
@@ -301,6 +301,7 @@
301 { "ZDDY0033", "\"$1\": integrity constraint not met for collection \"$2\"" },301 { "ZDDY0033", "\"$1\": integrity constraint not met for collection \"$2\"" },
302 { "ZDDY0034", "\"$1\": index range-value probe has search keys with incompatible types" },302 { "ZDDY0034", "\"$1\": index range-value probe has search keys with incompatible types" },
303 { "ZDDY0035", "\"$1\": index inserting more than one key not allowed for general index" },303 { "ZDDY0035", "\"$1\": index inserting more than one key not allowed for general index" },
304 { "ZDDY0036", "attempt to delete non-root node from collection \"$1\"" },
304 { "ZDST0001", "\"$1\": collection already declared" },305 { "ZDST0001", "\"$1\": collection already declared" },
305 { "ZDST0002", "\"$1\": collection already imported into module \"$2\"" },306 { "ZDST0002", "\"$1\": collection already imported into module \"$2\"" },
306 { "ZDST0003", "\"$1\": collection declaration not allowed in main module" },307 { "ZDST0003", "\"$1\": collection declaration not allowed in main module" },
307308
=== modified file 'src/runtime/collections/collections_impl.cpp'
--- src/runtime/collections/collections_impl.cpp 2012-04-08 21:39:25 +0000
+++ src/runtime/collections/collections_impl.cpp 2012-04-12 07:56:20 +0000
@@ -1520,10 +1520,18 @@
15201520
1521 while (consumeNext(node, theChildren[theChildren.size()-1].getp(), planState))1521 while (consumeNext(node, theChildren[theChildren.size()-1].getp(), planState))
1522 {1522 {
1523 if (! node->getCollection()) 1523 if (! node->getCollection())
1524 {1524 {
1525 throw XQUERY_EXCEPTION( zerr::ZDDY0017_NODE_IS_ORPHAN, ERROR_LOC( loc ) );1525 throw XQUERY_EXCEPTION( zerr::ZDDY0017_NODE_IS_ORPHAN, ERROR_LOC( loc ) );
1526 }1526 }
1527 if (node->getParent())
1528 {
1529 throw XQUERY_EXCEPTION(
1530 zerr::ZDDY0036_NON_ROOT_NODE_DELETION,
1531 ERROR_PARAMS(node->getCollection()->getName()->getStringValue()),
1532 ERROR_LOC( loc )
1533 );
1534 }
1527 if (collection && collection != node->getCollection()) 1535 if (collection && collection != node->getCollection())
1528 {1536 {
1529 throw XQUERY_EXCEPTION(1537 throw XQUERY_EXCEPTION(

Subscribers

People subscribed via source and target branches