X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fdbi.c;h=53f0ea576077a0059c96b0f4b2856287ff2a4205;hb=c9657772721a3782558c4eb8b99978c7873b45fd;hp=d178bc3ebeb55aee4caab11dbf638916e0d939a9;hpb=490437725e07c1eb86330cb2a21f0ff4e051cee5;p=bacula%2Fbacula diff --git a/bacula/src/cats/dbi.c b/bacula/src/cats/dbi.c index d178bc3ebe..53f0ea5760 100644 --- a/bacula/src/cats/dbi.c +++ b/bacula/src/cats/dbi.c @@ -6,7 +6,7 @@ The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. This program is Free Software; you can redistribute it and/or - modify it under the terms of version two of the GNU General Public + modify it under the terms of version three of the GNU Affero General Public License as published by the Free Software Foundation and included in the file LICENSE. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -398,6 +398,9 @@ db_close_database(JCR *jcr, B_DB *mdb) V(mutex); } +void db_check_backend_thread_safe() +{ } + void db_thread_cleanup() { } @@ -1229,7 +1232,7 @@ char *my_dbi_getvalue(dbi_result *result, int row_number, unsigned int column_nu return buf; } -static int my_dbi_sequence_last(B_DB *mdb, char *table_name) +static uint64_t my_dbi_sequence_last(B_DB *mdb, const char *table_name) { /* Obtain the current value of the sequence that @@ -1272,12 +1275,12 @@ static int my_dbi_sequence_last(B_DB *mdb, char *table_name) return id; } -int my_dbi_sql_insert_id(B_DB *mdb, const char *query, const char *table_name) +uint64_t my_dbi_insert_autokey_record(B_DB *mdb, const char *query, const char *table_name) { /* * First execute the insert query and then retrieve the currval. */ - if (!my_dbi_query(mdb, query)) { + if (my_dbi_query(mdb, query)) { return 0; }