kes Don't overwrite error message in check_tables_version.
kes Unlock batch insert tables with same calls used elsewhere.
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5662
91ce42f0-d328-0410-95d8-
f526ca767f89
bacula_db_version = 0;
if (!db_sql_query(mdb, query, int_handler, (void *)&bacula_db_version)) {
- Mmsg(mdb->errmsg, "Database not created or server not running.\n");
Jmsg(jcr, M_FATAL, 0, "%s", mdb->errmsg);
return false;
}
if (!db_sql_query(jcr->db_batch,sql_batch_fill_filename_query, NULL,NULL)) {
Jmsg(jcr,M_FATAL,0,"Can't fill Filename table %s\n",jcr->db_batch->errmsg);
- QUERY_DB(jcr, jcr->db_batch, sql_batch_unlock_tables_query);
+ db_sql_query(jcr->db_batch, sql_batch_unlock_tables_query, NULL, NULL);
return false;
}
mdb->connected = true;
free(db_name);
+ /* set busy handler to wait when we use mult_db_connections = 1 */
+#ifdef HAVE_SQLITE3
+ sqlite3_busy_handler(mdb->db, my_busy_handler, NULL);
+#else
+ sqlite_busy_handler(mdb->db, my_busy_handler, NULL);
+#endif
+
#if defined(HAVE_SQLITE3) && defined(SQLITE3_INIT_QUERY)
db_sql_query(mdb, SQLITE3_INIT_QUERY, NULL, NULL);
#endif
return 0;
}
- /* set busy handler to wait when we use mult_db_connections = 1 */
-#ifdef HAVE_SQLITE3
- sqlite3_busy_handler(mdb->db, my_busy_handler, NULL);
-#else
- sqlite_busy_handler(mdb->db, my_busy_handler, NULL);
-#endif
V(mutex);
return 1;
General:
26Sep07
+kes Setup SQLite busy handler before doing queries.
+kes Don't overwrite error message in check_tables_version.
+kes Unlock batch insert tables with same calls used elsewhere.
kes Allow starting 59 jobs a second.
kes Make SD session key more random.
kes Add retry for SQLite opening db if it fails.