From a84d3bb9d29accc4fa855ffc2e9be48814bbe2b8 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Wed, 7 Apr 2010 20:08:43 +0200 Subject: [PATCH] Fix stupid inverted logic --- bacula/src/cats/dbi.c | 2 +- bacula/src/cats/mysql.c | 2 +- bacula/src/cats/postgresql.c | 2 +- bacula/src/cats/sqlite.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bacula/src/cats/dbi.c b/bacula/src/cats/dbi.c index ae994bf39a..b560110401 100644 --- a/bacula/src/cats/dbi.c +++ b/bacula/src/cats/dbi.c @@ -1272,7 +1272,7 @@ int my_dbi_sql_insert_id(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; } diff --git a/bacula/src/cats/mysql.c b/bacula/src/cats/mysql.c index dc3e97c35e..3ee323c71e 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -378,7 +378,7 @@ int my_mysql_sql_insert_id(B_DB *mdb, const char *query, const char *table_name) /* * First execute the insert query and then retrieve the currval. */ - if (!mysql_query(mdb->db, query)) { + if (mysql_query(mdb->db, query)) { return 0; } diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index 9b208ab27b..58a4ee94d6 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -656,7 +656,7 @@ int my_postgresql_insert_id(B_DB *mdb, const char *query, const char *table_name /* * First execute the insert query and then retrieve the currval. */ - if (!my_postgresql_query(mdb, query)) { + if (my_postgresql_query(mdb, query)) { return 0; } diff --git a/bacula/src/cats/sqlite.c b/bacula/src/cats/sqlite.c index df42efdef5..e8b2f76f64 100644 --- a/bacula/src/cats/sqlite.c +++ b/bacula/src/cats/sqlite.c @@ -496,7 +496,7 @@ int my_sqlite_sql_insert_id(B_DB *mdb, const char *query, const char *table_name /* * First execute the insert query and then retrieve the currval. */ - if (!my_sqlite_query(mdb, query)) { + if (my_sqlite_query(mdb, query)) { return 0; } -- 2.39.5