Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17521
Modified Files:
pathfinder.mx
Log Message:
[ 1722078 ] PF: WebSite tests books[123] fail since 2007.05.03
temporary read-only documents now get indexed
in the past they did not get an index
with the value-indxing, this policy was changed. but the index creation would
make all read-only indexes persistent. this ends up pollution your repository
with a 1_nsloc_nid andrary 1_vx_hsh_nid bats, where 1 is a temporary docid.
this in turn causes a subsequent query to use those bogus bats instead.
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.363
retrieving revision 1.364
diff -u -d -r1.363 -r1.364
--- pathfinder.mx 19 May 2007 14:40:34 -0000 1.363
+++ pathfinder.mx 25 May 2007 00:16:59 -0000 1.364
@@ -1984,10 +1984,10 @@
BAT[void,oid] map_pid,
oid pre, oid att, bit updatable) : BAT[void,bat]
{
- # look if we have it already (readonly case)
+ # look if we have it already (persistent readonly case)
var nme := str(lng(coll_oid)) + "_qn_nid";
var vx_nme := str(lng(coll_oid)) + "_vx_hsh_nid";
- if (not(updatable)) {
+ if ((coll_oid >= DOCID_MIN) and not(updatable)) {
# hack: reverse/reverse to ensure it gets loaded
var b, err := CATCH(b := reverse(reverse(bat(nme))));
if (isnil(err)) return
new(void,bat).insert(nil,b).insert(nil,reverse(reverse(bat(vx_nme))));
@@ -2021,10 +2021,10 @@
vxp := tmp.leftfetchjoin(attr_own); tmp := nil;
tmp := vx_reduce(vxt, vxp); vxp := nil; vxt := nil;
- if (updatable) { # hash-index, created here each time document is first
used
+ if (updatable or (coll_oid < DOCID_MIN)) { # hash-index, created here each
time document is first used
(idx := bat(oid, oid, (count(idx)*8)/7).insert(idx)).accbuild("hash");
(vxm := bat(int, oid,
((count(vxm)+count(tmp))*8)/7).insert(vxm).insert(tmp)).accbuild("hash");
- } else { # read-only case. indices are sorted (binary search) and
persistent
+ } else { # persistent read-only case. indices are sorted (binary search)
# idx [qn,pre] lexico-ordered (thanks to stable-sort)
idx :=
idx.access(BAT_WRITE).sorder().access(BAT_READ).rename(nme).mmap(1).persists(true);
tmp := merged_union(vxm.hmark([EMAIL PROTECTED]), tmp.hmark([EMAIL
PROTECTED]), vxm.tmark([EMAIL PROTECTED]), tmp.tmark([EMAIL PROTECTED])); vxm
:= nil;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins