summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <Li-Bing.Song@sun.com>2009-09-28 10:23:06 +0800
committerunknown <Li-Bing.Song@sun.com>2009-09-28 10:23:06 +0800
commitc6186a2500390f5958d29b8d64a93140b74754a6 (patch)
tree042d2e3476814f90ff8bf8faa8b1755861752cbe /sql
parent3d211f39819db045c4992dcf1aab1c2473b56c66 (diff)
downloadmariadb-git-c6186a2500390f5958d29b8d64a93140b74754a6.tar.gz
BUG #46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior in ROW mode
In RBR, 'DROP TEMPORARY TABLE IF EXISTS...' statement is binlogged when the table does not exist. In fact, 'DROP TEMPORARY TABLE ...' statement should never be binlogged in RBR no matter if the table exists or not. This patch addresses this by checking whether we are dropping a temporary table or not, when building the custom drop statement.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 08f3311be9d..6dba2f02071 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1949,7 +1949,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
being built. The string always end in a comma and the comma
will be chopped off before being written to the binary log.
*/
- if (thd->current_stmt_binlog_row_based && !dont_log_query)
+ if (!drop_temporary && thd->current_stmt_binlog_row_based && !dont_log_query)
{
non_temp_tables_count++;
/*