diff options
author | unknown <aivanov@mysql.com> | 2005-12-11 17:06:36 +0300 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-12-11 17:06:36 +0300 |
commit | a26e2c200910287fe3b4bd68930112ad378bd58e (patch) | |
tree | 7df7f3c9ef2edd375e3ce55862aa2eb5d7359f56 /sql/sql_db.cc | |
parent | f81ed05cdcad5723c986c580cfcf3ee5e22a385c (diff) | |
download | mariadb-git-a26e2c200910287fe3b4bd68930112ad378bd58e.tar.gz |
Fixed BUG #14614: Replication of tables with trigger generates
error message if database is changed.
mysql-test/r/rpl_trigger.result:
Fixed results for the added test cases
mysql-test/t/rpl_trigger.test:
Added test cases for bug #14614
sql/sql_db.cc:
Fixed bug #14614.
Modified mysql_change_db(): The memory where db name resides
is freed by a slave thread.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index bde6522a38b..2500b213f4c 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -1162,10 +1162,12 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check) DBUG_RETURN(1); } end: - x_free(thd->db); + if (!(thd->slave_thread)) + x_free(thd->db); if (dbname && dbname[0] == 0) { - x_free(dbname); + if (!(thd->slave_thread)) + x_free(dbname); thd->db= NULL; thd->db_length= 0; } |