Commit 1d3d6ff5 authored by unknown's avatar unknown

Bug#15920 (Temporary tables are not logged in binlog):

  Fixing faulty tests preventing some CREATE TEMPORARY TABLE statements
  from being binlogged under statement-based replication.


mysql-test/t/disabled.def:
  Enabling rpl000002 test.
sql/sql_table.cc:
  Changed faulty tests so that creation of temporary tables are always done
  when statement-based logging is used.
parent 8d45ba3e
...@@ -22,6 +22,6 @@ group_min_max : Bug #15448 ...@@ -22,6 +22,6 @@ group_min_max : Bug #15448
innodb_concurrent : Results are not deterministic, Elliot will fix (BUG#3300) innodb_concurrent : Results are not deterministic, Elliot will fix (BUG#3300)
subselect : Bug#15706 subselect : Bug#15706
type_time : Bug#15805 type_time : Bug#15805
rpl000002 : Bug#15920 Temporary tables are not binlogged in SBR #rpl000002 : Bug#15920 Temporary tables are not binlogged in SBR
ps_7ndb : Bug#15923 Core dump in RBR mode when executing test suite ps_7ndb : Bug#15923 Core dump in RBR mode when executing test suite
sp_trans : Bug#15924 Code dump in RBR mode when executing test suite sp_trans : Bug#15924 Code dump in RBR mode when executing test suite
...@@ -1915,10 +1915,12 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -1915,10 +1915,12 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
- It is an internal temporary table, - It is an internal temporary table,
- Row-based logging is used and it we are creating a temporary table, or - Row-based logging is used and it we are creating a temporary table, or
- The binary log is not open. - The binary log is not open.
Otherwise, the statement shall be binlogged.
*/ */
if (!internal_tmp_table && if (!internal_tmp_table &&
!(binlog_row_based && (!binlog_row_based ||
(create_info->options & HA_LEX_CREATE_TMP_TABLE))) (binlog_row_based &&
!(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
write_bin_log(thd, TRUE, thd->query, thd->query_length); write_bin_log(thd, TRUE, thd->query, thd->query_length);
error= FALSE; error= FALSE;
unlock_and_end: unlock_and_end:
...@@ -3112,7 +3114,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, ...@@ -3112,7 +3114,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
Case 3 and 4 does nothing under RBR Case 3 and 4 does nothing under RBR
*/ */
} }
else if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE)) else
write_bin_log(thd, TRUE, thd->query, thd->query_length); write_bin_log(thd, TRUE, thd->query, thd->query_length);
res= FALSE; res= FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment