diff options
author | unknown <Li-Bing.Song@sun.com> | 2010-10-21 13:43:19 +0800 |
---|---|---|
committer | unknown <Li-Bing.Song@sun.com> | 2010-10-21 13:43:19 +0800 |
commit | 6646fecc1420fce3b2d2425aa07170370a7671bf (patch) | |
tree | a71610ac7afc9f829893f62f59174d2895526257 /sql/sql_parse.cc | |
parent | 3e9c52250a3ab6664c53ea6b3923acfbe8e09e4e (diff) | |
download | mariadb-git-6646fecc1420fce3b2d2425aa07170370a7671bf.tar.gz |
Bug#55478 Row events wrongly apply on the temporary table of the same name
Rows events were applied wrongly on the temporary table with the same name.
But rows events are generated only for base tables. As temporary
table's data never be binlogged on row mode. Normally, base table of the
same name cannot be updated if a temporary table has the same name.
But there are two cases which can generate rows events on
the base table of same name.
Case1: 'CREATE TABLE ... SELECT' statement.
In mixed format, it will generate rows events if it is unsafe.
Case2: Drop a transactional temporary table in a transaction
(happens only on 5.5+).
BEGIN;
DROP TEMPORARY TABLE t1; # t1 is a InnoDB table
INSERT INTO t1 VALUES(rand()); # t1 is a MyISAM table
COMMIT;
'DROP TEMPORARY TABLE' will be put in the transaction cache and
binlogged after the rows events generated by the 'INSERT' statement.
After this patch, slave opens only base table when applying a rows event.
Diffstat (limited to 'sql/sql_parse.cc')
0 files changed, 0 insertions, 0 deletions