Added transactions for corpse creation, added sql to fix a bug in raid member saving in some situations, fixed a bug in encounters

This commit is contained in:
KimLS
2014-11-08 15:22:03 -08:00
parent fe7774ab75
commit d987ccf289
5 changed files with 29 additions and 2 deletions
+12
View File
@@ -234,6 +234,18 @@ bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RE
return ret;
}
void DBcore::TransactionBegin() {
QueryDatabase("START TRANSACTION");
}
void DBcore::TransactionCommit() {
QueryDatabase("COMMIT");
}
void DBcore::TransactionRollback() {
QueryDatabase("ROLLBACK");
}
uint32 DBcore::DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen) {
// No good reason to lock the DB, we only need it in the first place to check char encoding.
// LockMutex lock(&MDatabase);