diff options
author | Luis Soares <luis.soares@sun.com> | 2009-07-26 22:48:24 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-07-26 22:48:24 +0100 |
commit | cf505e4494e86e09ce2c83af4dfe9f434eacb88c (patch) | |
tree | 3c0b18a6e2b864bf57586f4621b7343d5689aad8 /sql/handler.cc | |
parent | 8ec2f3d0d1943a282648bd0fe708539a539b18cc (diff) | |
download | mariadb-git-cf505e4494e86e09ce2c83af4dfe9f434eacb88c.tar.gz |
BUG#43046: mixed mode switch to row format with temp table lead
to wrong result
When using MIXED mode and issuing 'CREATE TEMPORARY TABLE t_tmp',
the statement is logged if the current binlogging mode is
STATEMENT. This causes the slave to replay the instruction and
create the temporary table as well. If there is no switch to ROW
mode, and later on a 'DROP TEMPORARY TABLE t_tmp' is issued, then
this statement will also be logged and the slave will
remove/close the temporary table.
However, if there is a switch to ROW mode between the CREATE and
DROP TEMPORARY table, the DROP statement will not be logged,
leaving the slave with a dangling temporary table.
This patch addresses this, by always logging a DROP TEMPORARY
TABLE IF EXISTS when in mixed mode and a drop statement is issued
for temporary table(s).
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
Added test case.
sql/sql_table.cc:
When dropping table(s) in mixed mode and current statement
logging is ROW, builds an extra DROP TEMPORARY TABLE IF
EXISTS for temporary tables that are being dropped. Later,
it logs the extra drop statement.
Diffstat (limited to 'sql/handler.cc')
0 files changed, 0 insertions, 0 deletions