mariadb/mysql-test/suite
Luis Soares e0ece40b64 BUG#54842: DROP TEMPORARY TABLE not binlogged after manual
switching binlog format to ROW

BUG 52616 fixed the case which the user would switch from STMT to
ROW binlog format, but the server would silently ignore it. After
that fix thd->is_current_stmt_binlog_format_row() reports correct
value at logging time and events are logged in ROW (as expected)
instead of STMT as they were previously and wrongly logged.

However, the fix was only partially complete, because on
disconnect, at THD cleanup, the implicit logging of temporary
tables is conditionally performed. If the binlog_format==ROW and
thd->is_current_stmt_binlog_format_row() is true then DROPs are
not logged. Given that the user can switch from STMT to ROW, this
is wrong because the server cannot tell, just by relying on the
ROW binlog format, that the tables have been dropped before. This
is effectively similar to the MIXED scenario when a switch from
STMT to ROW is triggered.

We fix this by removing this condition from
close_temporary_tables.

mysql-test/extra/binlog_tests/drop_temp_table.test:
  Added binlog test case.
mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result:
  Result changes because:
  - there is a missing drop on three temporary tables
  - it now contains results for the test added
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Result now contains the implicit drop for the temporary table.
mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result:
  Result file changed because it now contains results for added
  test case.
mysql-test/suite/rpl/r/rpl_drop_temp.result:
  Result file changed because it now contains results for added
  test case.
mysql-test/suite/rpl/t/rpl_drop_temp.test:
  Added replication test case.
sql/sql_base.cc:
  Removed the condition that would make the server to skip
  logging implicit drops when ROW binary log format mode was 
  in use.
  Additionally, deployed DBUG_ENTER/RETURN macros.
2010-06-29 11:54:58 +01:00
..
binlog BUG#54842: DROP TEMPORARY TABLE not binlogged after manual 2010-06-29 11:54:58 +01:00
bugs Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
engines Manual merge 2010-05-26 22:34:25 +08:00
federated Bug #53261 MTR tests archive_plugin and blackhole_plugin fail when compiling with cmake 2010-06-14 11:23:49 +02:00
funcs_1 WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
ibmdb2i Bug#49329 example (and other) engines use wrong collation for open tables hash 2009-12-11 12:31:16 +05:30
innodb Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00
jp WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
large_tests bug#50296 2010-02-28 19:39:28 +02:00
manual Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
ndb BUG#50479 DDL stmt on row-only/stmt-only tables generate spurious binlog_format 2010-06-02 00:25:08 +01:00
ndb_team Manual merge 2010-05-26 22:34:25 +08:00
parts WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
perfschema Post-push fixups for WL#5349 2010-06-22 12:13:47 +02:00
perfschema_stress WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
rpl BUG#54842: DROP TEMPORARY TABLE not binlogged after manual 2010-06-29 11:54:58 +01:00
rpl_ndb Manual merge from mysql-trunk-bugfixing. 2010-06-07 12:47:04 +04:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00