db_unlock(mdb);
}
+#ifdef HAVE_BATCH_FILE_INSERT
char *my_mysql_batch_lock_path_query = "LOCK TABLES Path write, "
" batch write, "
" Path as p write ";
" (SELECT Name "
" FROM Filename AS f "
" WHERE f.Name = a.Name) ";
+#endif /* HAVE_BATCH_FILE_INSERT */
#endif /* HAVE_MYSQL */
return dest;
}
+#ifdef HAVE_BATCH_FILE_INSERT
char *my_pg_batch_lock_path_query = "BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE";
" (SELECT DISTINCT Name FROM batch) as a "
" WHERE NOT EXISTS "
" (SELECT Name FROM Filename WHERE Name = a.Name)";
+#endif /* HAVE_BATCH_FILE_INSERT */
+
#endif /* HAVE_POSTGRESQL */
* };
*/
+#ifdef HAVE_BATCH_FILE_INSERT
+
/* All sql_batch_* functions are used to do bulk batch insert in File/Filename/Path
* tables. This code can be activated by adding "#define HAVE_BATCH_FILE_INSERT 1"
* in baconfig.h
return true;
}
-#ifdef HAVE_BATCH_FILE_INSERT
/*
* Returns 1 if OK
* 0 if failed
return mdb->fields[mdb->field++];
}
+#ifdef HAVE_BATCH_FILE_INSERT
char *my_sqlite_batch_lock_query = "BEGIN";
char *my_sqlite_batch_unlock_query = "COMMIT";
char *my_sqlite_batch_fill_path_query = "INSERT INTO Path (Path) "
char *my_sqlite_batch_fill_filename_query = "INSERT INTO Filename (Name) "
" SELECT DISTINCT Name FROM batch "
" EXCEPT SELECT Name FROM Filename ";
-
+#endif /* HAVE_BATCH_FILE_INSERT */
#endif /* HAVE_SQLITE */
General:
23Sep07
+kes Turn off some code when batch insert not enabled.
kes Edit FD name in connect error messages.
kes Rework the reservation system to take into account that the Director
might give us a Volume that is different from the current one being