summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2004-09-07 14:57:54 +0200
committerguilhem@mysql.com <>2004-09-07 14:57:54 +0200
commit168e4c9c6b476e7153860dc66ef8e18beabccd14 (patch)
tree790661e2d03e6fbacccd70957d8f9df8397563ee /sql/sql_db.cc
parent491adcb589331ac08522fe36ffdbf8ebda867007 (diff)
downloadmariadb-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.cc9
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;