Merge pull request #352 from peace-maker/charset_thread

Lock database before setting character set
This commit is contained in:
Kyle Sanderson 2015-06-29 12:14:09 -07:00
commit a410aefd6d

View File

@ -297,5 +297,9 @@ IDBDriver *MyDatabase::GetDriver()
bool MyDatabase::SetCharacterSet(const char *characterset) bool MyDatabase::SetCharacterSet(const char *characterset)
{ {
return mysql_set_character_set(m_mysql, characterset) == 0 ? true : false; bool res;
LockForFullAtomicOperation();
res = mysql_set_character_set(m_mysql, characterset) == 0 ? true : false;
UnlockFromFullAtomicOperation();
return res;
} }