From a0db7c5bf4d53bfc0dab036a82862ab2bfe2f833 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 14 Jan 2012 10:41:25 +0100 Subject: [PATCH] Fix bug #1810 use single quotes instead of double quotes for MinValue and MaxValue in catalog --- bacula/src/cats/sql_create.c | 4 ++-- bacula/src/cats/sql_get.c | 4 ++-- bacula/src/cats/sql_update.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index 2f0eb5f222..a72b83dc25 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2010 Free Software Foundation Europe e.V. + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -656,7 +656,7 @@ int db_create_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr) } mdb->db_escape_string(jcr, esc, cr->Counter, strlen(cr->Counter)); /* Must create it */ - Mmsg(mdb->cmd, "INSERT INTO Counters (Counter,\"MinValue\",\"MaxValue\",CurrentValue," + Mmsg(mdb->cmd, "INSERT INTO Counters (Counter,'MinValue','MaxValue',CurrentValue," "WrapCounter) VALUES ('%s','%d','%d','%d','%s')", esc, cr->MinValue, cr->MaxValue, cr->CurrentValue, cr->WrapCounter); diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 7e4960eed7..d1ed6d13e2 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2010 Free Software Foundation Europe e.V. + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -756,7 +756,7 @@ int db_get_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr) db_lock(mdb); mdb->db_escape_string(jcr, esc, cr->Counter, strlen(cr->Counter)); - Mmsg(mdb->cmd, "SELECT \"MinValue\",\"MaxValue\",CurrentValue,WrapCounter " + Mmsg(mdb->cmd, "SELECT 'MinValue','MaxValue',CurrentValue,WrapCounter " "FROM Counters WHERE Counter='%s'", esc); if (QUERY_DB(jcr, mdb, mdb->cmd)) { diff --git a/bacula/src/cats/sql_update.c b/bacula/src/cats/sql_update.c index 27dd0ab411..3090911ea5 100644 --- a/bacula/src/cats/sql_update.c +++ b/bacula/src/cats/sql_update.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2008 Free Software Foundation Europe e.V. + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -254,7 +254,7 @@ int db_update_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr) db_lock(mdb); mdb->db_escape_string(jcr, esc, cr->Counter, strlen(cr->Counter)); Mmsg(mdb->cmd, -"UPDATE Counters SET \"MinValue\"=%d,\"MaxValue\"=%d,CurrentValue=%d," +"UPDATE Counters SET 'MinValue'=%d,'MaxValue'=%d,CurrentValue=%d," "WrapCounter='%s' WHERE Counter='%s'", cr->MinValue, cr->MaxValue, cr->CurrentValue, cr->WrapCounter, esc); -- 2.39.5