Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12783
Modified Files:
pftijah.mx
Log Message:
slightly changed checks, that might help in cases as described
in bug 2810280.
U pftijah.mx
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -d -r1.231 -r1.232
--- pftijah.mx 20 May 2009 14:31:47 -0000 1.231
+++ pftijah.mx 30 Jun 2009 07:07:48 -0000 1.232
@@ -577,13 +577,21 @@
lock_set(tj_adm_lock);
var err := CATCH({
if ( verbose ) printf(HASH +"TJ tj_init_collection(\"%s\")
called.\n",ftiName);
-
- if (not(isnil(CATCH(bat("tj_collName").count_wrd())))) {
+
+ # check existence of global index management BATs
+ if ( not(view_bbp_name().reverse().exist("tj_pfc_fti_dep")) ) {
tj_init_global(new(str,str),false); # just in case
}
- if (bat("tj_collName").reverse().exist(ftiName)) {
- if ( not(rebuild) )
- ERROR("tj_init_collection, pftijah collection already exists:
%s\n",ftiName);
+ # check whether index already exists
+ if ( view_bbp_name().reverse().exist("tj_" + ftiName + "_size1") ) {
+ if ( not(rebuild) ) {
+ # check whether collection is empty
+ if (bat("tj_" + ftiName + "_size1").count_wrd() = wrd(0)) {
+ tj_delete_collection(ftiName, false);
+ } else {
+ ERROR("tj_init_collection, pftijah collection already exists:
%s\n",ftiName);
+ }
+ }
} else {
if (rebuild) {
ERROR("tj_rebuild_collection, pftijah collection \"%s\" does not
exists\n",ftiName);
------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins