diff options
author | mkindahl@dl145h.mysql.com <> | 2007-11-16 15:55:22 +0100 |
---|---|---|
committer | mkindahl@dl145h.mysql.com <> | 2007-11-16 15:55:22 +0100 |
commit | e0ae105055dd82623fcd34a875be963c6499d78a (patch) | |
tree | d5ee1dd616c0b74ef0c99eb5a0ee47d35d876ea3 /sql/sql_db.cc | |
parent | d7f570c05696bcaaafaec8552bbcfa1d23139d7e (diff) | |
download | mariadb-git-e0ae105055dd82623fcd34a875be963c6499d78a.tar.gz |
Bug#32435:
DROP DATABASE statement writes changes to mysql.proc table under RBR
When replicating a DROP DATABASE statement with a database holding
stored procedures, the changes to the mysql.proc table was recorded
in the binary log under row-based replication.
With this patch, the thread uses statement-logging format for the
duration of the DROP DATABASE statement. The logging format is
(already) reset at the end of the statement, so no additional code
for resetting the logging format is necessary.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index abbf2131957..ad4e0d803eb 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -883,6 +883,13 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) VOID(pthread_mutex_lock(&LOCK_mysql_create_db)); + /* + This statement will be replicated as a statement, even when using + row-based replication. The flag will be reset at the end of the + statement. + */ + thd->clear_current_stmt_binlog_row_based(); + length= build_table_filename(path, sizeof(path), db, "", "", 0); strmov(path+length, MY_DB_OPT_FILE); // Append db option file name del_dbopt(path); // Remove dboption hash entry |