Update of /cvsroot/monetdb/pathfinder/runtime
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28837
Modified Files:
pathfinder.mx pf_support.mx
Log Message:
bugfix 2418722
- properly filter out nodes from deleted documents used in a downward step
U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -d -r1.457 -r1.458
--- pathfinder.mx 17 Apr 2009 14:24:43 -0000 1.457
+++ pathfinder.mx 17 Apr 2009 23:42:15 -0000 1.458
@@ -2468,7 +2468,7 @@
res :=
res.access(BAT_WRITE).insert(ins).deleteBuns(del).access(BAT_READ);
}
# SCJ must catch error and use sequential post-filter instead.
- return ws_docfilter(ws, sort(res).hmark(oid_nil), cont).tmark(0...@0);
+ return ws_docfilter(ws, sort(res).hmark(oid_nil), cont,
true).tmark(0...@0);
}
@@ -2566,7 +2566,7 @@
if ((count(id_pre) + count(key_nid)) > (10*count(iter_val))) {
id_pre := id_iter.project(1...@0); break;
}
- var key_pre := ws_docfilter(ws, key_nid, $h).ssort(); # sort on
[iter,pre]
+ var key_pre := ws_docfilter(ws, key_nid, $h, true).ssort(); # sort on
[iter,pre]
id_pre.insert(reverse(reverse(key_pre).leftfetchjoin(key_id)));
}
return id_pre;
@@ -2576,7 +2576,7 @@
# also makes sure that returned documents get an OPEN_DOCID ws entry
PROC ws_docfilter(bat[void,bat] ws,
bat[any::1,oid] any_pre,
- oid cont) : bat[any::1,oid]
+ oid cont, bit swizzle) : bat[any::1,oid]
{
var map_pid := ws.fetch(MAP_PID).fetch(cont);
var nid_rid := ws.fetch(NID_RID).fetch(cont);
@@ -2587,8 +2587,9 @@
var open_name := ws.fetch(OPEN_NAME);
# first, ensure sorted PREs
- var isolate := (ttype(map_pid) = oid);
- if (not(isolate)) {
+ if (swizzle)
+ swizzle := (ttype(map_pid) = oid);
+ if (not(swizzle)) {
any_pre := any_pre.tsort(); # no-op for read-only nsloc element index
if (frag_root.exist(TEMP_DOC)) return any_pre; # temporary document
(collections) can never have been deleted
} else if (any_pre.htype() = void) {
@@ -4193,7 +4194,7 @@
mapi_register(xquery_frontend()); # open up mapi client access
if (monet_environment.find("monet_welcome") = "yes")
- printf("%c MonetDB/XQuery module v0.29.0 loaded (default back-end is
'%s')\n", int(35), monet_environment.find("xquery_backend"));
+ printf("%c MonetDB/XQuery module v0.28.3 loaded (default back-end is
'%s')\n", int(35), monet_environment.find("xquery_backend"));
# ^^^^^^
# Maintained via vertoo. Please don't modify by hand!
# Contact [email protected] for details and/or
assistance.
U pf_support.mx
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.331
retrieving revision 1.332
diff -u -d -r1.331 -r1.332
--- pf_support.mx 17 Mar 2009 15:09:07 -0000 1.331
+++ pf_support.mx 17 Apr 2009 23:42:15 -0000 1.332
@@ -2582,15 +2582,22 @@
@:mapping_code@
}
@= no_pre
- cands := ws.fetch(PRE_SIZE).fetch(contID).mirror(); # no selection:
cands is everything
+ { cands := ws.fetch(PRE_SIZE).fetch(contID).mirror(); # no selection:
cands is everything
+ collnode_filter := result_part_item; }
@= kind_pre
- { cands := ws.fetch(PRE_KIND).fetch(contID); kind_test := @1; }
+ { cands := ws.fetch(PRE_KIND).fetch(contID);
+ kind_test := @1;
+ collnode_filter := result_part_item; }
@= nsloc_pre
- { var nsloc := ns + NS_ACCEL_SEP + loc;
@:prefilter(nsloc,QN_URI_LOC,ELEMENT)@ }
+ { var nsloc := ns + NS_ACCEL_SEP + loc;
+ @:prefilter(nsloc,QN_URI_LOC,ELEMENT)@
+ collnode_filter := result_part_item; }
@= loc_pre
- { @:prefilter(loc,QN_LOC,ELEMENT)@ }
+ { @:prefilter(loc,QN_LOC,ELEMENT)@
+ collnode_filter := result_part_item; }
@= ns_pre
- { @:prefilter(ns,QN_URI,ELEMENT)@ }
+ { @:prefilter(ns,QN_URI,ELEMENT)@
+ collnode_filter := result_part_item; }
@= prefilter
cands := ws.fetch(PRE_SIZE).fetch(contID).mirror();
var pre_cont := ws.fetch(PRE_CONT).fetch(contID);
@@ -2630,15 +2637,15 @@
@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@, @:tgt_params@,
@:target_post@, @:params2@,@:no_pre@)@
@
@= loop_lifted_scj_step1
-@:loop_lifted_scj_step2(@1,,,,,,
)@
-@:loop_lifted_scj_step2(@1,_with_kind_test, @:kind_args@, @:kind_params@,
@:kind_post(kind)@,,)@
-@:loop_lifted_scj_step2(@1,_with_nsloc_test,
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@ ,,)@
-@:loop_lifted_scj_step2(@1,_with_ns_test, @:ns_args@, @:ns_params@,
@:ns_post@ ,,)@
-@:loop_lifted_scj_step2(@1,_with_loc_test, @:loc_args@, @:loc_params@,
@:loc_post@ ,,)@
-@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@, @:tgt_params@,
@:target_post@ ,,)@
+@:loop_lifted_scj_step2(@1, , , ,
,,,false)@
+@:loop_lifted_scj_step2(@1,_with_kind_test, @:kind_args@, @:kind_params@,
@:kind_post(kind)@,,,false)@
+@:loop_lifted_scj_step2(@1,_with_nsloc_test,
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@ ,,,false)@
+@:loop_lifted_scj_step2(@1,_with_ns_test, @:ns_args@, @:ns_params@,
@:ns_post@ ,,,false)@
+@:loop_lifted_scj_step2(@1,_with_loc_test, @:loc_args@, @:loc_params@,
@:loc_post@ ,,,false)@
+@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@, @:tgt_params@,
@:target_post@ ,,,false)@
@
@= loop_lifted_scj_step1x
-@:loop_lifted_scj_step2(@1,,,,,
@:params1@,)@
+@:loop_lifted_scj_step2(@1,,,,,
@:params1@,,false)@
@:loop_lifted_scj_step2(@1,_with_kind_test, @:kind_args@, @:kind_params@,,
@:params1@,kind_test := kind;)@
@:loop_lifted_scj_step2(@1,_with_nsloc_test,
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@, @:params1@,kind_test :=
ELEMENT;)@
@:loop_lifted_scj_step2(@1,_with_ns_test, @:ns_args@, @:ns_params@,
@:ns_post@, @:params1@,kind_test := ELEMENT;)@
@@ -2651,6 +2658,7 @@
result_part_iter := result_part_iter.chk_order();
result_part_item := result_part_item.chk_order();
result_part_cont := nil;
+ var collnode_filter := new(void,oid);
# pre-test
@4
@@ -2663,6 +2671,15 @@
# post-test
@2
+
+ # filter out downward steps if the context contains the collection root
+ if (postfilter) {
+ if (collnode_filter.texist(0...@0)) {
+ var pivot := ws_docfilter(ws, result_part_item, contID,
false);
+ result_part_item := pivot.tmark(0...@0);
+ result_part_iter :=
pivot.hmark(0...@0).leftfetchjoin(result_part_iter);
+ }
+ }
@
@= loop_lifted_scj_step2
PROC loop_lift...@1_step@2 (bat[void, oid] iter, bat[void, oid] item,
bat[void, oid] cont, bat[void, bat] ws @3) : bat[void,bat]
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins