zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #08777
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-986377 into lp:zorba.
Requested reviews:
Matthias Brantner (matthias-brantner)
Markos Zaharioudakis (markos-za)
Related bugs:
Bug #986377 in Zorba: "do not apply any updates on collection if it is to be truncated "
https://bugs.launchpad.net/zorba/+bug/986377
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-986377/+merge/103908
- no undo is done for collection truncate
- fix for bug #986377 "do not apply any updates on collection if it is to be truncated"
--
https://code.launchpad.net/~zorba-coders/zorba/bug-986377/+merge/103908
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2012-04-25 17:16:48 +0000
+++ ChangeLog 2012-04-27 15:49:21 +0000
@@ -32,6 +32,7 @@
* Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64)
* Fixed bug #988412 (date:current-dateTime daylight saving)
* Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
+ * Fixed bug #986377 (do not apply any updates on collection if it is to be truncated)
* Fixed bug #921458 (file:read-text-lines() blocking)
* Fixed bug #981405 (do not hoist expr containing try-catch variables out of the
associated try-catch expression)
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-04-24 12:39:38 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-04-27 15:49:21 +0000
@@ -2044,10 +2044,6 @@
<value>all nodes must be in same collection</value>
</diagnostic>
- <diagnostic code="ZDDY0019" name="UNDO_NOT_POSSIBLE">
- <value>"$1": collection $2 cannot be undone</value>
- </diagnostic>
-
<diagnostic code="ZDDY0020" name="INDEX_DOMAIN_NODE_NOT_IN_COLLECTION">
<value>"$1": index domain expression yields nodes that are not in collection</value>
</diagnostic>
=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp 2012-04-24 12:39:38 +0000
+++ src/store/naive/pul_primitives.cpp 2012-04-27 15:49:21 +0000
@@ -1293,19 +1293,11 @@
assert(lColl);
lColl->removeAll();
- theIsApplied = true;
-
}
void UpdTruncateCollection::undo()
{
- if (!theIsApplied) return;
-
- throw ZORBA_EXCEPTION(
- zerr::ZDDY0019_UNDO_NOT_POSSIBLE,
- ERROR_PARAMS( theName->getStringValue(), "truncation" )
- );
-
+ // NOOP
}
=== modified file 'src/store/naive/simple_pul.cpp'
--- src/store/naive/simple_pul.cpp 2012-04-24 12:39:38 +0000
+++ src/store/naive/simple_pul.cpp 2012-04-27 15:49:21 +0000
@@ -2104,6 +2104,14 @@
if (!theDeleteCollectionList.empty())
return;
+ // if the collection is truncated, no other primitive needs to be applied
+ if (!theTruncateCollectionList.empty())
+ {
+ applyList(theTruncateCollectionList);
+ theIsApplied = true;
+ return;
+ }
+
try
{
// Compute the before-delta for each incrementally maintained index.
@@ -2195,7 +2203,6 @@
applyList(theCreateCollectionList);
applyList(theInsertIntoCollectionList);
applyList(theDeleteFromCollectionList);
- applyList(theTruncateCollectionList);
// Compute the after-delta for each incrementally maintained index.
computeIndexAfterDeltas();
Follow ups
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-05-15
-
Re: [Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-05-15
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-05-15
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Matthias Brantner, 2012-05-15
-
Re: [Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Markos Zaharioudakis, 2012-05-03
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-04-27
-
Re: [Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-04-27
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Zorba Build Bot, 2012-04-27
-
Re: [Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Matthias Brantner, 2012-04-27
-
[Merge] lp:~zorba-coders/zorba/bug-986377 into lp:zorba
From: Matthias Brantner, 2012-04-27