summaryrefslogtreecommitdiff
path: root/mysql-test/r/ps_ddl.result
diff options
context:
space:
mode:
authorunknown <Li-Bing.Song@sun.com>2010-01-16 15:44:24 +0800
committerunknown <Li-Bing.Song@sun.com>2010-01-16 15:44:24 +0800
commit377d710296c3b0c85ea4cdc018d1d8e08bfa022a (patch)
tree5cb87884cc819c950b796602fd62601a7c339e24 /mysql-test/r/ps_ddl.result
parent7a7147c5b4cca1bfd1bfbecd4883d3968526b162 (diff)
downloadmariadb-git-377d710296c3b0c85ea4cdc018d1d8e08bfa022a.tar.gz
BUG#47418 RBR fails, failure with mixup of base/temporary/view
'CREATE TABLE IF NOT EXISTS ... SELECT' statement were causing 'CREATE TEMPORARY TABLE ...' to be written to the binary log in row-based mode (a.k.a. RBR), when there was a temporary table with the same name. Because the 'CREATE TABLE ... SELECT' statement was executed as 'INSERT ... SELECT' into the temporary table. Since in RBR mode no other statements related to temporary tables are written into binary log, this sometimes broke replication. This patch changes behavior of 'CREATE TABLE [IF NOT EXISTS] ... SELECT ...'. it ignores existence of temporary table with the same name as table being created and is interpreted as attempt to create/insert into base table. This makes behavior of 'CREATE TABLE [IF NOT EXISTS] ... SELECT' consistent with how ordinary 'CREATE TABLE' and 'CREATE TABLE ... LIKE' behave.
Diffstat (limited to 'mysql-test/r/ps_ddl.result')
-rw-r--r--mysql-test/r/ps_ddl.result8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/r/ps_ddl.result b/mysql-test/r/ps_ddl.result
index c7e8812320c..375f31ef9c4 100644
--- a/mysql-test/r/ps_ddl.result
+++ b/mysql-test/r/ps_ddl.result
@@ -1695,23 +1695,23 @@ SUCCESS
drop table t2;
create temporary table t2 (a int);
execute stmt;
-ERROR 42S01: Table 't2' already exists
call p_verify_reprepare_count(1);
SUCCESS
execute stmt;
ERROR 42S01: Table 't2' already exists
-call p_verify_reprepare_count(0);
+call p_verify_reprepare_count(1);
SUCCESS
drop temporary table t2;
execute stmt;
-call p_verify_reprepare_count(1);
+ERROR 42S01: Table 't2' already exists
+call p_verify_reprepare_count(0);
SUCCESS
drop table t2;
execute stmt;
-call p_verify_reprepare_count(0);
+call p_verify_reprepare_count(1);
SUCCESS
drop table t2;