X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/88d417fe320b5ea8746f86f7f10e2c7ba31a437c..d8845c7819caac09b95c4cdf1e8d48cc1cb1b7a6:/projects/stargazer/plugins/store/mysql/mysql_store.cpp diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index 2600c859..8108de09 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -222,12 +222,13 @@ else { if(mysql_select_db(sock, storeSettings.GetDBName().c_str())) { - errorStr = "Couldn't select database! With error:\n"; - errorStr += mysql_error(sock); - mysql_close(sock); - ret = -1; + errorStr = "Couldn't select database! With error:\n"; + errorStr += mysql_error(sock); + mysql_close(sock); + ret = -1; } - ret = CheckAllTables(sock); + else + ret = CheckAllTables(sock); } } else @@ -1766,7 +1767,8 @@ if (schemaVersion > 0) res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'"; if (schemaVersion > 1) - res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'"; + res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'"\ + ", change_policy_timeout='" + formatTime(td.tariffConf.changePolicy) + "'"; strprintf(¶m, " WHERE name='%s' LIMIT 1", tariffName.c_str()); res += param;