[Database] Set multi statements off when returning early (#3462)

This commit is contained in:
Chris Miles 2023-07-01 18:49:09 -05:00 committed by GitHub
parent dfadc237e5
commit 7873ad3771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,6 +365,8 @@ MySQLRequestResult DBcore::QueryDatabaseMulti(const std::string &query)
mysql_free_result(res);
}
SetMultiStatementsOff();
return r;
}
}
@ -418,6 +420,8 @@ MySQLRequestResult DBcore::QueryDatabaseMulti(const std::string &query)
r.SetErrorMessage(error_message);
r.SetErrorNumber(mysql_errno(mysql));
SetMultiStatementsOff();
// we handle errors elsewhere
return r;
}