summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
author <Li-Bing.Song@sun.com>2010-01-16 15:44:24 +0800
committer <Li-Bing.Song@sun.com>2010-01-16 15:44:24 +0800
commit6f380d1650ad123c61640522cb5274eb143a5fa9 (patch)
tree5cb87884cc819c950b796602fd62601a7c339e24 /mysql-test/r/create.result
parent440f5a9cad69a31424a7881f722ee93dfbc3ca07 (diff)
downloadmariadb-git-6f380d1650ad123c61640522cb5274eb143a5fa9.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/create.result')
-rw-r--r--mysql-test/r/create.result7
1 files changed, 2 insertions, 5 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index b829ef30fb1..cfdf2565c9c 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -820,16 +820,13 @@ i
drop table t1;
create temporary table t1 (j int);
create table if not exists t1 select 1;
-Warnings:
-Note 1050 Table 't1' already exists
select * from t1;
j
-1
drop temporary table t1;
select * from t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
+1
+1
drop table t1;
-ERROR 42S02: Unknown table 't1'
create table t1 (i int);
insert into t1 values (1), (2);
lock tables t1 read;