Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13122/modules/pftijah
Modified Files:
Tag: M5XQ
pftijah.mx
Log Message:
propagated changes of Tuesday Jun 30 2009 - Wednesday Jul 01 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/06/30 - hrode: modules/pftijah/pftijah.mx,1.232
slightly changed checks, that might help in cases as described
in bug 2810280.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.226.2.4
retrieving revision 1.226.2.5
diff -u -d -r1.226.2.4 -r1.226.2.5
--- pftijah.mx 20 May 2009 15:56:25 -0000 1.226.2.4
+++ pftijah.mx 1 Jul 2009 08:01:25 -0000 1.226.2.5
@@ -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