summaryrefslogtreecommitdiff
path: root/src/common/sql.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-15 18:12:47 -0200
committershennetsind <ind@henn.et>2013-02-15 18:12:47 -0200
commit355673d34b52cb21aa85d8b9f07a11b530c4c656 (patch)
tree79087d48cde7ca51d9e4a79a5904ffcb8ba2dac0 /src/common/sql.c
parent79f839d5a871a33512b7c6c700542d9e2192f696 (diff)
downloadhercules-355673d34b52cb21aa85d8b9f07a11b530c4c656.tar.gz
hercules-355673d34b52cb21aa85d8b9f07a11b530c4c656.tar.bz2
hercules-355673d34b52cb21aa85d8b9f07a11b530c4c656.tar.xz
hercules-355673d34b52cb21aa85d8b9f07a11b530c4c656.zip
MySQL Update Checker: Updated
Added a primary key to the `sql_updates` table (special thanks to Trojal) Modified the parser to ignore new/empty lines and added support for "//" comments in the index file. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/sql.c')
-rw-r--r--src/common/sql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/sql.c b/src/common/sql.c
index fdb6e0114..c0ab19e4e 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -1031,6 +1031,9 @@ void Sql_HerculesUpdateCheck(Sql* self) {
char timestamp[11];// "1360186680" (10) + 1
FILE* ufp;/* upgrade fp */
+ if( line[0] == '\n' || ( line[0] == '/' && line[1] == '/' ) )/* skip \n and "//" comments */
+ continue;
+
sprintf(path,"sql-files/upgrades/%s",line);
if( !( ufp = fopen(path, "r") ) ) {