Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv12206/runtime
Modified Files:
shredder.mx
Log Message:
fixing BUG #1706438 "PF: property error when adding a doc. to an existing coll."
Though we do not set the key-ness property in the shredder,
property checking (BATpropcheck) might have detected and set the
key property that "happens to hold" after an initial shred of a
single document. When added more document(s) to the same
collection, we need to make sure, that we unset the then (most
probably, if not surely) no longer valid property.
(Since we usually do not expect and hence exploit the key property
in the size & kind BATs, we omit an expensive check to find out
whether it might still hold...)
Index: shredder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- shredder.mx 9 Apr 2007 21:44:59 -0000 1.125
+++ shredder.mx 24 Apr 2007 15:04:42 -0000 1.126
@@ -1644,6 +1644,24 @@
for(i=PRE_SIZE; i<=PRE_NID; i++) {
shredBAT_setcount(&shredCtx->dstBAT[i], newsize);
}
+ if (newsize > 1) {
+ /* Though we do not set the key-ness property here,
+ * property checking (BATpropcheck) might have detected and set the
+ * key property that "happens to hold" after an initial shred of a
+ * single document. When added more document(s) to the same
+ * collection, we need to make sure, that we unset the then (most
+ * probably, if not surely) no longer valid property.
+ * (Since we usually don't expect and hence exploit the key property
+ * in the size & kind BATs, we omit an expensive check to find out
+ * whether it might still hold...)
+ */
+ if (shredCtx->dstBAT[PRE_SIZE].bat->tkey == TRUE) {
+ BATkey(BATmirror(shredCtx->dstBAT[PRE_SIZE].bat), FALSE);
+ }
+ if (shredCtx->dstBAT[PRE_KIND].bat->tkey == TRUE) {
+ BATkey(BATmirror(shredCtx->dstBAT[PRE_KIND].bat), FALSE);
+ }
+ }
assert((shredCtx->updatable && shredCtx->nnode_nid <= newsize) ||
(!shredCtx->updatable && shredCtx->nnode_nid == newsize));
shredBAT_setcount(&shredCtx->dstBAT[NID_RID], shredCtx->nnode_nid);
for(i=ATTR_OWN; i<=ATTR_PROP; i++) {
-------------------------------------------------------------------------
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