Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32039

Modified Files:
      Tag: XQuery_0-18
        pathfinder.mx 
Log Message:
- add a check against duplicate shredder names



Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.367.2.1
retrieving revision 1.367.2.2
diff -u -d -r1.367.2.1 -r1.367.2.2
--- pathfinder.mx       3 Jun 2007 20:21:30 -0000       1.367.2.1
+++ pathfinder.mx       6 Jun 2007 15:09:14 -0000       1.367.2.2
@@ -3467,6 +3467,10 @@
     if (count(selidx_colname) > 0)
         selidx_colname := reverse(reverse(idx_colnames).kunique().sort());
 
+    var chk := select(idx_names.histogram(),2,int_nil);
+    if (count(chk) > 0) 
+        ERROR("A document named '%s' is added more than once (%d such 
errors).", reverse(chk).fetch(0), count(chk));
+
     lock_set(pf_short);
     err := CATCH(pivot := _shred_doc_base(selidx_colname, idx_names, 
idx_colnames, wsid));
     lock_unset(pf_short);
@@ -3574,7 +3578,9 @@
         # check if a document-id = its collection-id
         # this detects del-doc()s on single-doc collections
        var chk := mirror(del).leftjoin(doc_collection);
+chk.print();
         ret := [=](chk.hmark([EMAIL PROTECTED]),chk.tmark([EMAIL 
PROTECTED])).texist(true);
+ret.print();
     } else if (cachedOnly) {
         del := del.uselect(timestamp_nil,timestamp_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

Reply via email to