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

Proposed by Ghislain Fourny
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11152
Merged at revision: 11156
Proposed branch: lp:~zorba-coders/zorba/bug-1092842
Merge into: lp:zorba
Diff against target: 80 lines (+32/-0)
6 files modified
src/store/naive/json_items.cpp (+4/-0)
test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res (+1/-0)
test/rbkt/Queries/zorba/collections/collection_001.xqdata (+2/-0)
test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq (+12/-0)
test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq (+12/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1092842
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Chris Hillery Approve
Review via email: mp+141049@code.launchpad.net

Commit message

"Fixing bug 1092842 (tree pointers of nested items in an object or array do not get swapped correctly upon dml:edit.)"

Description of the change

"Fixing bug 1092842 (tree pointers of nested items in an object or array do not get swapped correctly upon dml:edit.)"

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

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

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

I'm not the right person to review this, but I'll vote Approve so I don't hold up the merge proposal. I trust Matthias' review of the actual change.

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

Validation queue job bug-1092842-2012-12-21T10-12-59.724Z 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: 1 Approve, 1 Pending.

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-1092842-2012-12-21T17-30-50.469Z 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 'src/store/naive/json_items.cpp'
--- src/store/naive/json_items.cpp 2012-12-14 13:11:51 +0000
+++ src/store/naive/json_items.cpp 2012-12-21 10:11:20 +0000
@@ -503,6 +503,8 @@
503 assert(lOther);503 assert(lOther);
504 std::swap(theKeys, lOther->theKeys);504 std::swap(theKeys, lOther->theKeys);
505 std::swap(thePairs, lOther->thePairs);505 std::swap(thePairs, lOther->thePairs);
506 setTree(getTree());
507 lOther->setTree(lOther->getTree());
506}508}
507509
508/******************************************************************************510/******************************************************************************
@@ -934,6 +936,8 @@
934 SimpleJSONArray* lOther = dynamic_cast<SimpleJSONArray*>(anotherItem);936 SimpleJSONArray* lOther = dynamic_cast<SimpleJSONArray*>(anotherItem);
935 assert(lOther);937 assert(lOther);
936 std::swap(theContent, lOther->theContent);938 std::swap(theContent, lOther->theContent);
939 setTree(getTree());
940 lOther->setTree(lOther->getTree());
937}941}
938942
939/******************************************************************************943/******************************************************************************
940944
=== added file 'test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res'
--- test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res 2012-12-21 10:11:20 +0000
@@ -0,0 +1,1 @@
1{ "bar" : "foo", "foo" : [ { "foo" : "bar" } ] }
02
=== added file 'test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res'
--- test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res 2012-12-21 10:11:20 +0000
@@ -0,0 +1,1 @@
1[ 1, 2, 3, [ { "foo" : "bar" } ] ]
02
=== modified file 'test/rbkt/Queries/zorba/collections/collection_001.xqdata'
--- test/rbkt/Queries/zorba/collections/collection_001.xqdata 2012-12-11 14:47:49 +0000
+++ test/rbkt/Queries/zorba/collections/collection_001.xqdata 2012-12-21 10:11:20 +0000
@@ -8,6 +8,8 @@
88
9declare collection ns:collection-objects as object()*;9declare collection ns:collection-objects as object()*;
1010
11declare collection ns:collection-arrays as array()*;
12
11declare %ann:ordered collection ns:collection2;13declare %ann:ordered collection ns:collection2;
1214
13declare %ann:const collection ns:collection_const as node()*;15declare %ann:const collection ns:collection_const as node()*;
1416
=== added file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq'
--- test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq 2012-12-21 10:11:20 +0000
@@ -0,0 +1,12 @@
1import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
2import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
3
4import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
5
6ddl:create(xs:QName("ns:collection-objects"));
7
8dml:insert(xs:QName("ns:collection-objects"), { "foo" : "bar", "bar" : [ 1, 2, 3, { "foo" : "bar" } ] });
9
10dml:edit(dml:collection(xs:QName("ns:collection-objects")), { "bar" : "foo", "foo" : [ { "foo" : "bar" } ] });
11
12dml:collection(xs:QName("ns:collection-objects"))
013
=== added file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq'
--- test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq 2012-12-21 10:11:20 +0000
@@ -0,0 +1,12 @@
1import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
2import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
3
4import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
5
6ddl:create(xs:QName("ns:collection-arrays"));
7
8dml:insert(xs:QName("ns:collection-arrays"), [ { "foo" : "bar" }, 1, 2, 3 ]);
9
10dml:edit(dml:collection(xs:QName("ns:collection-arrays")), [ 1, 2, 3, [ { "foo" : "bar" } ] ]);
11
12dml:collection(xs:QName("ns:collection-arrays"))

Subscribers

People subscribed via source and target branches