79 lines
3.3 KiB
Diff
79 lines
3.3 KiB
Diff
diff -up ./src/cats/make_mysql_tables.in.old ./src/cats/make_mysql_tables.in
|
|
--- ./src/cats/make_mysql_tables.in.old 2011-11-03 12:57:05.237131261 +0100
|
|
+++ ./src/cats/make_mysql_tables.in 2011-11-03 12:57:16.639988706 +0100
|
|
@@ -324,8 +324,8 @@ CREATE TABLE UnsavedFiles (
|
|
|
|
CREATE TABLE Counters (
|
|
Counter TINYBLOB NOT NULL,
|
|
- MinValue INTEGER DEFAULT 0,
|
|
- MaxValue INTEGER DEFAULT 0,
|
|
+ \`MinValue\` INTEGER DEFAULT 0,
|
|
+ \`MaxValue\` INTEGER DEFAULT 0,
|
|
CurrentValue INTEGER DEFAULT 0,
|
|
WrapCounter TINYBLOB NOT NULL,
|
|
PRIMARY KEY (Counter(128))
|
|
diff -up ./src/cats/sql_create.c.old ./src/cats/sql_create.c
|
|
--- ./src/cats/sql_create.c.old 2011-11-03 12:57:05.238131249 +0100
|
|
+++ ./src/cats/sql_create.c 2011-11-03 12:57:16.641988682 +0100
|
|
@@ -627,7 +627,7 @@ int db_create_counter_record(JCR *jcr, B
|
|
}
|
|
|
|
/* 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')",
|
|
cr->Counter, cr->MinValue, cr->MaxValue, cr->CurrentValue,
|
|
cr->WrapCounter);
|
|
diff -up ./src/cats/sql_get.c.old ./src/cats/sql_get.c
|
|
--- ./src/cats/sql_get.c.old 2011-11-03 12:57:05.239131237 +0100
|
|
+++ ./src/cats/sql_get.c 2011-11-03 12:57:16.645988630 +0100
|
|
@@ -730,7 +730,7 @@ int db_get_counter_record(JCR *jcr, B_DB
|
|
SQL_ROW row;
|
|
|
|
db_lock(mdb);
|
|
- Mmsg(mdb->cmd, "SELECT MinValue,MaxValue,CurrentValue,WrapCounter "
|
|
+ Mmsg(mdb->cmd, "SELECT \"MinValue\",\"MaxValue\",CurrentValue,WrapCounter "
|
|
"FROM Counters WHERE Counter='%s'", cr->Counter);
|
|
|
|
if (QUERY_DB(jcr, mdb, mdb->cmd)) {
|
|
diff -up ./src/cats/sql_update.c.old ./src/cats/sql_update.c
|
|
--- ./src/cats/sql_update.c.old 2011-11-03 12:57:05.240131225 +0100
|
|
+++ ./src/cats/sql_update.c 2011-11-03 12:57:16.646988618 +0100
|
|
@@ -243,7 +243,7 @@ int db_update_counter_record(JCR *jcr, B
|
|
db_lock(mdb);
|
|
|
|
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, cr->Counter);
|
|
diff -up ./src/win32/cats/make_mysql_tables.sql.old ./src/win32/cats/make_mysql_tables.sql
|
|
--- ./src/win32/cats/make_mysql_tables.sql.old 2011-11-03 13:09:26.311866553 +0100
|
|
+++ ./src/win32/cats/make_mysql_tables.sql 2011-11-03 13:11:13.281529248 +0100
|
|
@@ -306,8 +306,8 @@ CREATE TABLE UnsavedFiles (
|
|
|
|
CREATE TABLE Counters (
|
|
Counter TINYBLOB NOT NULL,
|
|
- MinValue INTEGER DEFAULT 0,
|
|
- MaxValue INTEGER DEFAULT 0,
|
|
+ `MinValue` INTEGER DEFAULT 0,
|
|
+ `MaxValue` INTEGER DEFAULT 0,
|
|
CurrentValue INTEGER DEFAULT 0,
|
|
WrapCounter TINYBLOB NOT NULL,
|
|
PRIMARY KEY (Counter(128))
|
|
diff -up ./updatedb/update_mysql_tables_5_to_6.old ./updatedb/update_mysql_tables_5_to_6
|
|
--- ./updatedb/update_mysql_tables_5_to_6.old 2011-11-03 13:09:37.497726710 +0100
|
|
+++ ./updatedb/update_mysql_tables_5_to_6 2011-11-03 13:11:13.282529236 +0100
|
|
@@ -79,8 +79,8 @@ DROP TABLE Counters;
|
|
|
|
CREATE TABLE Counters (
|
|
Counter TINYBLOB NOT NULL,
|
|
- MinValue INTEGER,
|
|
- MaxValue INTEGER,
|
|
+ \`MinValue\` INTEGER DEFAULT 0,
|
|
+ \`MaxValue\` INTEGER DEFAULT 0,
|
|
CurrentValue INTEGER,
|
|
WrapCounter TINYBLOB NOT NULL,
|
|
PRIMARY KEY (Counter(128))
|