1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

when we update thd->db in replication, it's safer to update thd->db_length too.

This does not fix any known bug, but is still a good idea.
This commit is contained in:
guilhem@mysql.com
2004-09-07 14:57:54 +02:00
parent 491adcb589
commit 168e4c9c6b
3 changed files with 28 additions and 8 deletions

View File

@ -385,6 +385,15 @@ err:
}
/*
Changes the current database.
NOTES
Do as little as possible in this function, as it is not called for the
replication slave SQL thread (for that thread, setting of thd->db is done
in ::exec_event() methods of log_event.cc).
*/
bool mysql_change_db(THD *thd,const char *name)
{
int length, db_length;