diff options
author | unknown <Li-Bing.Song@sun.com> | 2009-11-03 17:00:41 +0800 |
---|---|---|
committer | unknown <Li-Bing.Song@sun.com> | 2009-11-03 17:00:41 +0800 |
commit | 9819885177059fd75f3250b917142eb9d6ae5b8c (patch) | |
tree | 360f1d23b2f7d6c52e6a3e8e30808e2737485e51 /sql/sql_base.cc | |
parent | e077bb49d784a88a4a3967a0e6467c3c07d7d206 (diff) | |
download | mariadb-git-9819885177059fd75f3250b917142eb9d6ae5b8c.tar.gz |
BUG#48216 Replication fails on all slaves after upgrade to 5.0.86 on master
When a sessione is closed, all temporary tables of the session are automatically
dropped and are binlogged. But it will be binlogged with wrong database names when
the length of the temporary tables' database names are greater than the
length of the current database name or the current database is not set.
Query_log_event's db_len is forgot to set when Query_log_event's db is set.
This patch wrote code to set db_len immediately after db has set.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index db4ab29d6de..178c3e12e23 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -798,6 +798,7 @@ void close_temporary_tables(THD *thd) s_query.length() - 1 /* to remove trailing ',' */, 0, FALSE, THD::NOT_KILLED); qinfo.db= db.ptr(); + qinfo.db_len= db.length(); thd->variables.character_set_client= cs_save; DBUG_ASSERT(qinfo.error_code == 0); mysql_bin_log.write(&qinfo); |