diff options
author | guilhem@mysql.com <> | 2004-09-07 14:57:54 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2004-09-07 14:57:54 +0200 |
commit | 168e4c9c6b476e7153860dc66ef8e18beabccd14 (patch) | |
tree | 790661e2d03e6fbacccd70957d8f9df8397563ee /sql/sql_db.cc | |
parent | 491adcb589331ac08522fe36ffdbf8ebda867007 (diff) | |
download | mariadb-git-168e4c9c6b476e7153860dc66ef8e18beabccd14.tar.gz |
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.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 3d877403813..c8874701aa1 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -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; |