Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4016/runtime
Modified Files:
Tag: XQuery_0-22
pf_support.mx
Log Message:
fixing my previous fix of re-opened
[ 1850772 ] XQ: [preceding and following]-sibling:: bug
http://sourceforge.net/tracker/index.php?func=detail&aid=1850772&group_id=56967&atid=482468
The "unique iters" / "unique items" optimization
must NOT be done at all in case we have end_ctx nodes,
i.e., in case we "mis-use" a limited child-step
to evaluate preceding-sibling(ctx) as child(parent(ctx))!
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.277.6.1
retrieving revision 1.277.6.2
diff -u -d -r1.277.6.1 -r1.277.6.2
--- pf_support.mx 21 Feb 2008 21:41:24 -0000 1.277.6.1
+++ pf_support.mx 21 Feb 2008 22:18:08 -0000 1.277.6.2
@@ -1426,7 +1426,11 @@
# => we do not need to sort the input
order := or(order,1);
@= unique_iters
- # unique iters
+ if (end_ctx.count() = 0) {
+ # unique iters optimization;
+ # must NOT be done in case we have end_ctx nodes, i.e., in
+ # case we "mis-use" a limited child-step to evaluate
+ # preceding-sibling as child(parent(ctx))!
var unq_items;
unq_items := item.reverse().kunique();
if ((item.count() - unq_items.count()) > 1000) {
@@ -1436,12 +1440,10 @@
.leftjoin(unq_items.mark([EMAIL
PROTECTED]));
item := unq_items.mark([EMAIL PROTECTED]).reverse();
iter := item.mirror();
- if (end_ctx.count() > 0) {
- end_ctx :=
unq_items.leftfetchjoin(end_ctx).tmark([EMAIL PROTECTED]);
- }
# we now certainly have iter|item ordering
order := and(order,2);
}
+ }
@= resolve_unique_iters
# undo memoization and remap iter values
if (unq_iter) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins