diff --git a/PropertyServer/PropertyServer.cpp b/PropertyServer/PropertyServer.cpp index 8f65f00..ffea009 100644 --- a/PropertyServer/PropertyServer.cpp +++ b/PropertyServer/PropertyServer.cpp @@ -139,7 +139,7 @@ void PropertyServer::doReserveDb(const string path, TC_Config *pconf) { TLOGDEBUG(__FUNCTION__ << ", drop name:" << name << ", tableName: " << tableName << ", " << (name < tableName) << endl); - mysql.execute("drop table " + name); + mysql.execute("DROP TABLE IF EXISTS " + name); } else { diff --git a/StatServer/StatServer.cpp b/StatServer/StatServer.cpp index 661c083..5ef5d62 100644 --- a/StatServer/StatServer.cpp +++ b/StatServer/StatServer.cpp @@ -139,7 +139,7 @@ void StatServer::doReserveDb(const string path, TC_Config *pconf) { TLOGDEBUG(__FUNCTION__ << ", drop name:" << name << ", tableName: " << tableName << ", " << (name < tableName) << endl); - mysql.execute("drop table " + name); + mysql.execute("DROP TABLE IF EXISTS " + name); } else {