diff options
author | s.sujatha <sujatha.sivakumar@oracle.com> | 2014-12-29 12:17:55 +0530 |
---|---|---|
committer | s.sujatha <sujatha.sivakumar@oracle.com> | 2014-12-29 12:17:55 +0530 |
commit | 5da083ef67eabd92aa316ead7fc3a0af69655977 (patch) | |
tree | dface2a336fea2e15e3b92d69fb997e90fc87f2f /sql/sql_db.cc | |
parent | 901ce5314b6b0d4115b0237491e2afaafe5a274e (diff) | |
download | mariadb-git-5da083ef67eabd92aa316ead7fc3a0af69655977.tar.gz |
Bug#20041860: SLAVE ERROR WHEN DROP DATABASE
Fix:
===
Backport Bug#11756194 to mysql-5.5. slave breaks if
'drop database' fails on master and mismatched tables on
slave.
'DROP TABLE <deleted tables>' was binlogged when
'DROP DATABASE' failed and at least one table was deleted
from the database. The log event would lead slave SQL thread
stop if some of the tables did not exist on slave.
After this patch, It is always binlogged with 'IF EXISTS'
option.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index f4ac6fbbef7..e24d87e849f 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -942,7 +942,7 @@ update_binlog: if (!(query= (char*) thd->alloc(MAX_DROP_TABLE_Q_LEN))) goto exit; /* not much else we can do */ - query_pos= query_data_start= strmov(query,"DROP TABLE "); + query_pos= query_data_start= strmov(query,"DROP TABLE IF EXISTS "); query_end= query + MAX_DROP_TABLE_Q_LEN; db_len= strlen(db); |