zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #00237
[Merge] lp:~markos-za/zorba/markos-bugs into lp:zorba
Markos Zaharioudakis has proposed merging lp:~markos-za/zorba/markos-bugs into lp:zorba.
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~markos-za/zorba/markos-bugs/+merge/77141
Fixed bug #855314 + removed unused deleteIndex method from store api
--
https://code.launchpad.net/~markos-za/zorba/markos-bugs/+merge/77141
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2011-09-16 13:26:06 +0000
+++ ChangeLog 2011-09-27 11:15:53 +0000
@@ -30,6 +30,7 @@
* Fixed bug # (Should not destroy the parent of a node that is being detached
before the detach is done).
* Fixed bug #3408181 (available-collection() returns undeclared collections)
+ * Fixed bug #855314 (should not fold a constant expr that returns an error item)
version 2.0.1
=== modified file 'src/compiler/rewriter/rules/fold_rules.cpp'
--- src/compiler/rewriter/rules/fold_rules.cpp 2011-09-02 20:43:46 +0000
+++ src/compiler/rewriter/rules/fold_rules.cpp 2011-09-27 11:15:53 +0000
@@ -103,6 +103,14 @@
{
break;
}
+
+ if (item->isError())
+ {
+ node->setUnfoldable(ANNOTATION_TRUE_FIXED);
+ node->setNonDiscardable(ANNOTATION_TRUE_FIXED);
+ return node;
+ }
+
result.push_back(item);
}
=== modified file 'src/store/api/store.h'
--- src/store/api/store.h 2011-09-26 17:52:57 +0000
+++ src/store/api/store.h 2011-09-27 11:15:53 +0000
@@ -243,11 +243,11 @@
/* ------------------------ Index Management ---------------------------*/
/**
- * Creates a new index.
+ * Creates a new index. Used for temp indexes only (non-temp indexes are
+ * created via PUL primitives).
*
- * @param qname The qname identifying the index. For non-temporary indices,
- * the store maintains the map between qnames and indices and makes
- * sure that there are no two indices with the same qname.
+ * @param qname The qname identifying the index. Node: The map between
+ * qnames and temp indices is stored in the dynamic context.
* @param spec The index specification. It specifies the index properties
* (@see index.h)
* @param sourceIter It produces the entries to be inserted in the index.
@@ -270,11 +270,6 @@
*/
virtual Index* getIndex(const Item* qname) = 0;
- /**
- * Destroy the index with the given qname. The index must not be a temporary one.
- */
- virtual void deleteIndex(const Item* qname) = 0;
-
/**
* Returns an iterator that lists the names of all the available indexes.
*/
=== added file 'test/rbkt/Queries/zorba/misc/hoist_error.spec'
--- test/rbkt/Queries/zorba/misc/hoist_error.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/misc/hoist_error.spec 2011-09-27 11:15:53 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0074
=== added file 'test/rbkt/Queries/zorba/misc/hoist_error.xq'
--- test/rbkt/Queries/zorba/misc/hoist_error.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/misc/hoist_error.xq 2011-09-27 11:15:53 +0000
@@ -0,0 +1,8 @@
+
+declare function local:crash() as element()*
+{
+ for $id in (1,2)
+ return element {"a:a"}{}
+};
+
+local:crash()
Follow ups