Commit 2bd41fc5 authored by Sergei Golubchik's avatar Sergei Golubchik

Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE

Specifically:

Revert "MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection"
This reverts commit ba875e93.

Revert "MDEV-29620 Assertion `next_insert_id == 0' failed in handler::ha_external_lock"
This reverts commit aa08a744.

Revert "MDEV-29628 Memory leak after CREATE OR REPLACE with foreign key"
This reverts commit c579d66b.

Revert "MDEV-29609 create_not_windows test fails with different result"
This reverts commit cb583b2f.

Revert "MDEV-29544 SIGSEGV in HA_CREATE_INFO::finalize_locked_tables"
This reverts commit dcd66c38.

Revert "MDEV-28933 CREATE OR REPLACE fails to recreate same constraint name"
This reverts commit cf6c5176.

Revert "MDEV-28933 Moved RENAME_CONSTRAINT_IDS to include/sql_funcs.h"
This reverts commit f1e1c133.

Revert "MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES"
This reverts commit a228ec80.

Revert "MDEV-25292 gcol.gcol_bugfixes --ps fix"
This reverts commit 24fff826.

Revert "MDEV-25292 Disable atomic replace for slave-generated or-replace"
This reverts commit 2af15914.

Revert "MDEV-25292 backup_log improved"
This reverts commit 34398a20.

Revert "MDEV-25292 Atomic CREATE OR REPLACE TABLE"
This reverts commit 93c8252f.

Revert "MDEV-25292 Table_name class for (db, table_name, alias)"
This reverts commit d145dda9.

Revert "MDEV-25292 ha_table_exists() cleanup and improvement"
This reverts commit 409b8a86.

Revert "MDEV-25292 Cleanups"
This reverts commit 595dad83.

Revert "MDEV-25292 Refactoring: moved select_field_count into Alter_info."
This reverts commit f02af1d2.
parent d1526099
[row]
binlog-format=row
[stmt]
binlog-format=statement
[mix]
binlog-format=mixed
# This file adds combinations for all binlog formats: row, stmt, mix
# Under each combination a corresponding binlog-format option is set.
--source include/have_log_bin.inc
......@@ -7,7 +7,7 @@
# non-partitioned testing
--echo #
--echo # Testing normal tables
--echo # Testing with normal tables
--echo #
eval create table t1 (a int) engine=myisam $part_int;
......@@ -20,8 +20,6 @@ repair table t1;
optimize table t1;
drop table t1;
--source backup_log_print.inc
eval create table t1_innodb (a int) engine=innodb $part_int;
insert into t1_innodb values (1),(2);
alter table t1_innodb add column b int;
......@@ -32,8 +30,6 @@ repair table t1_innodb;
optimize table t1_innodb;
drop table t1_innodb;
--source backup_log_print.inc
--echo #
--echo # Testing with temporary tables (should not be logged)
--echo #
......@@ -45,8 +41,6 @@ rename table tmp_t11 to tmp_t10;
truncate table tmp_t10;
drop table tmp_t10;
--source backup_log_print.inc
--echo #
--echo # Testing with mix of normal and temporary tables
--echo #
......@@ -60,8 +54,6 @@ eval create table t21 (a int) $part_int;
drop temporary table if exists tmp_t21,t21;
drop table if exists tmp_t21,t21;
--source backup_log_print.inc
--echo #
--echo # Testing create select
--echo #
......@@ -76,8 +68,6 @@ eval create or replace table t31 (a int primary key) $part_int select * from t30
eval create table t32 (a int) $part_int;
drop table if exists t30,t31,t32,tmp_t30;
--source backup_log_print.inc
--echo #
--echo # Testing create LIKE
--echo #
......@@ -91,8 +81,6 @@ create or replace table t42 like t41;
show create table t42;
drop table t40, t41, t42;
--source backup_log_print.inc
--echo #
--echo # Testing rename
--echo #
......@@ -103,8 +91,6 @@ rename table t50 to t52, t51 to t53;
rename table t52 to tmp, t53 to t52, tmp to t53;
drop table t52,t53;
--source backup_log_print.inc
--echo #
--echo # Testing enable/disable keys
--echo #
......@@ -121,8 +107,6 @@ INSERT INTO t61 VALUES(1),(2),(3);
ALTER TABLE t61 DISABLE KEYS;
DROP TABLE t61;
--source backup_log_print.inc
--echo #
--echo # Testing load data
--echo #
......@@ -144,8 +128,6 @@ insert into t71 select * from t70;
unlock tables;
drop table t70,t71;
--source backup_log_print.inc
--echo #
--echo # Testing strange table names
--echo #
......@@ -153,8 +135,6 @@ drop table t70,t71;
eval create table `t 1` (a int) $part_int;
drop table `t 1`;
--source backup_log_print.inc
--echo #
--echo # Testing views and triggers
--echo #
......@@ -166,8 +146,6 @@ drop trigger trg;
drop view v1;
drop table t80;
--source backup_log_print.inc
--echo #
--echo # Testing alter to a new storage engine
--echo #
......@@ -175,5 +153,3 @@ drop table t80;
eval create table t85 (a int primary key, b int) engine=myisam $part_int;
alter table t85 engine=innodb;
drop table t85;
--source backup_log_print.inc
......@@ -4,7 +4,7 @@ connect con1,localhost,root,,;
BACKUP STAGE START;
connection default;
#
# Testing normal tables
# Testing with normal tables
#
create table t1 (a int) engine=myisam ;
insert into t1 values (1),(2);
......@@ -19,16 +19,6 @@ optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
drop table t1;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t1,id: 1,,0,,,
ALTER,MyISAM,0,test,t1,id: 1,MyISAM,0,test,t1,id: 2
RENAME,MyISAM,0,test,t1,id: 2,MyISAM,0,test,t2,id: 2
RENAME,MyISAM,0,test,t2,id: 2,MyISAM,0,test,t1,id: 2
repair,MyISAM,0,test,t1,id: 2,,0,,,
optimize,MyISAM,0,test,t1,id: 2,,0,,,
DROP,MyISAM,0,test,t1,id: 2,,0,,,
create table t1_innodb (a int) engine=innodb ;
insert into t1_innodb values (1),(2);
alter table t1_innodb add column b int;
......@@ -44,17 +34,6 @@ test.t1_innodb optimize note Table does not support optimize, doing recreate + a
test.t1_innodb optimize status OK
drop table t1_innodb;
#
# Reading backup ddl log file
#
CREATE,InnoDB,0,test,t1_innodb,id: 1,,0,,,
ALTER,InnoDB,0,test,t1_innodb,id: 1,InnoDB,0,test,t1_innodb,id: 2
RENAME,InnoDB,0,test,t1_innodb,id: 2,InnoDB,0,test,t2_innodb,id: 2
RENAME,InnoDB,0,test,t2_innodb,id: 2,InnoDB,0,test,t1_innodb,id: 2
TRUNCATE,InnoDB,0,test,t1_innodb,id: 2,,0,,,
repair,InnoDB,0,test,t1_innodb,id: 2,,0,,,
ALTER,InnoDB,0,test,t1_innodb,id: 2,InnoDB,0,test,t1_innodb,id: 3
DROP,InnoDB,0,test,t1_innodb,id: 3,,0,,,
#
# Testing with temporary tables (should not be logged)
#
create temporary table tmp_t10 (a int) engine=myisam;
......@@ -64,9 +43,6 @@ rename table tmp_t11 to tmp_t10;
truncate table tmp_t10;
drop table tmp_t10;
#
# Reading backup ddl log file
#
#
# Testing with mix of normal and temporary tables
#
create temporary table tmp_t20 (a int);
......@@ -81,13 +57,6 @@ drop table if exists tmp_t21,t21;
Warnings:
Note 1051 Unknown table 'test.tmp_t21'
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t20,id: 1,,0,,,
DROP,MyISAM,0,test,t20,id: 1,,0,,,
CREATE,MyISAM,0,test,t21,id: 2,,0,,,
DROP,MyISAM,0,test,t21,id: 2,,0,,,
#
# Testing create select
#
create table t30 (a int) ;
......@@ -100,18 +69,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
create table t32 (a int) ;
drop table if exists t30,t31,t32,tmp_t30;
Warnings:
Note 1051 Unknown table 'test.tmp_t30'
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t30,id: 1,,0,,,
CREATE,MyISAM,0,test,t31,id: 2,,0,,,
DROP,MyISAM,0,test,t31,id: 2,,0,,,
CREATE,MyISAM,0,test,t31,id: 3,,0,,,
CREATE,MyISAM,0,test,t32,id: 4,,0,,,
DROP,MyISAM,0,test,t30,id: 1,,0,,,
DROP,MyISAM,0,test,t31,id: 3,,0,,,
DROP,MyISAM,0,test,t32,id: 4,,0,,,
Note 1051 Unknown table 'test.t31,test.tmp_t30'
#
# Testing create LIKE
#
......@@ -128,17 +86,6 @@ t42 CREATE TABLE `t42` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t40, t41, t42;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t40,id: 1,,0,,,
CREATE,InnoDB,0,test,t41,id: 2,,0,,,
CREATE,MyISAM,0,test,t42,id: 3,,0,,,
DROP,MyISAM,0,test,t42,id: 3,,0,,,
CREATE,InnoDB,0,test,t42,id: 4,,0,,,
DROP,MyISAM,0,test,t40,id: 1,,0,,,
DROP,InnoDB,0,test,t41,id: 2,,0,,,
DROP,InnoDB,0,test,t42,id: 4,,0,,,
#
# Testing rename
#
create table t50 (a int) ;
......@@ -147,18 +94,6 @@ rename table t50 to t52, t51 to t53;
rename table t52 to tmp, t53 to t52, tmp to t53;
drop table t52,t53;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t50,id: 1,,0,,,
CREATE,MyISAM,0,test,t51,id: 2,,0,,,
RENAME,MyISAM,0,test,t50,id: 1,MyISAM,0,test,t52,id: 1
RENAME,MyISAM,0,test,t51,id: 2,MyISAM,0,test,t53,id: 2
RENAME,MyISAM,0,test,t52,id: 1,MyISAM,0,test,tmp,id: 1
RENAME,MyISAM,0,test,t53,id: 2,MyISAM,0,test,t52,id: 2
RENAME,MyISAM,0,test,tmp,id: 1,MyISAM,0,test,t53,id: 1
DROP,MyISAM,0,test,t52,id: 2,,0,,,
DROP,MyISAM,0,test,t53,id: 1,,0,,,
#
# Testing enable/disable keys
#
CREATE TABLE t60 (a int(10), index(a) ) ENGINE=Aria ;
......@@ -172,13 +107,6 @@ INSERT INTO t61 VALUES(1),(2),(3);
ALTER TABLE t61 DISABLE KEYS;
DROP TABLE t61;
#
# Reading backup ddl log file
#
CREATE,Aria,0,test,t60,id: 1,,0,,,
CHANGE_INDEX,Aria,0,test,t60,id: 1,,0,,,
CHANGE_INDEX,Aria,0,test,t60,id: 1,,0,,,
DROP,Aria,0,test,t60,id: 1,,0,,,
#
# Testing load data
#
create table t70 (a date, b date, c date not null, d date) engine=aria ;
......@@ -195,26 +123,11 @@ insert into t71 select * from t70;
unlock tables;
drop table t70,t71;
#
# Reading backup ddl log file
#
CREATE,Aria,0,test,t70,id: 1,,0,,,
BULK_INSERT,Aria,0,test,t70,id: 1,,0,,,
BULK_INSERT,Aria,0,test,t70,id: 1,,0,,,
CREATE,Aria,0,test,t71,id: 2,,0,,,
BULK_INSERT,Aria,0,test,t71,id: 2,,0,,,
DROP,Aria,0,test,t70,id: 1,,0,,,
DROP,Aria,0,test,t71,id: 2,,0,,,
#
# Testing strange table names
#
create table `t 1` (a int) ;
drop table `t 1`;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t@00201,id: 1,,0,,,
DROP,MyISAM,0,test,t@00201,id: 1,,0,,,
#
# Testing views and triggers
#
create table t80 (a int, b int) engine=myisam ;
......@@ -224,27 +137,12 @@ drop trigger trg;
drop view v1;
drop table t80;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t80,id: 1,,0,,,
CREATE,VIEW,0,test,v1,,,0,,,
CREATE,TRIGGER,0,test,trg,,,0,,,
DROP,TRIGGER,0,test,trg,,,0,,,
DROP,VIEW,0,test,v1,,,0,,,
DROP,MyISAM,0,test,t80,id: 1,,0,,,
#
# Testing alter to a new storage engine
#
create table t85 (a int primary key, b int) engine=myisam ;
alter table t85 engine=innodb;
drop table t85;
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t85,id: 1,,0,,,
ALTER,MyISAM,0,test,t85,id: 1,InnoDB,0,test,t85,id: 2
DROP,InnoDB,0,test,t85,id: 2,,0,,,
#
# Testing create/drop/alter database
#
create database mysqltest;
......@@ -253,16 +151,6 @@ create table mysqltest.t91 (a int primary key, b int) engine=innodb;
alter database mysqltest character set utf8;
drop database mysqltest;
#
# Reading backup ddl log file
#
CREATE,DATABASE,0,mysqltest,,,,0,,,
CREATE,MyISAM,0,mysqltest,t90,id: 1,,0,,,
CREATE,InnoDB,0,mysqltest,t91,id: 2,,0,,,
ALTER,DATABASE,0,mysqltest,,,,0,,,
DROP,MyISAM,0,mysqltest,t90,id: 1,,0,,,
DROP,InnoDB,0,mysqltest,t91,id: 2,,0,,,
DROP,DATABASE,0,mysqltest,,,,0,,,
#
# MENT-222 bug testing
#
CREATE TABLE IF NOT EXISTS t_exists LIKE t_exists_template;
......@@ -271,14 +159,83 @@ Note 1050 Table 't_exists' already exists
#
# Reading backup ddl log file
#
CREATE,MyISAM,0,test,t1,id: 1,,0,,,
ALTER,MyISAM,0,test,t1,id: 1,MyISAM,0,test,t1,id: 2
RENAME,MyISAM,0,test,t1,id: 2,MyISAM,0,test,t2,id: 2
RENAME,MyISAM,0,test,t2,id: 2,MyISAM,0,test,t1,id: 2
repair,MyISAM,0,test,t1,id: 2,,0,,,
optimize,MyISAM,0,test,t1,id: 2,,0,,,
DROP,MyISAM,0,test,t1,id: 2,,0,,,
CREATE,InnoDB,0,test,t1_innodb,id: 3,,0,,,
ALTER,InnoDB,0,test,t1_innodb,id: 3,InnoDB,0,test,t1_innodb,id: 4
RENAME,InnoDB,0,test,t1_innodb,id: 4,InnoDB,0,test,t2_innodb,id: 4
RENAME,InnoDB,0,test,t2_innodb,id: 4,InnoDB,0,test,t1_innodb,id: 4
TRUNCATE,InnoDB,0,test,t1_innodb,id: 4,,0,,,
repair,InnoDB,0,test,t1_innodb,id: 4,,0,,,
ALTER,InnoDB,0,test,t1_innodb,id: 4,InnoDB,0,test,t1_innodb,id: 5
DROP,InnoDB,0,test,t1_innodb,id: 5,,0,,,
CREATE,MyISAM,0,test,t20,id: 6,,0,,,
DROP,MyISAM,0,test,t20,id: 6,,0,,,
CREATE,MyISAM,0,test,t21,id: 7,,0,,,
DROP,MyISAM,0,test,t21,id: 7,,0,,,
CREATE,MyISAM,0,test,t30,id: 8,,0,,,
CREATE,MyISAM,0,test,t31,id: 9,,0,,,
DROP,MyISAM,0,test,t31,id: 9,,0,,,
CREATE,MyISAM,0,test,t31,id: 10,,0,,,
DROP,MyISAM,0,test,t31,id: 10,,0,,,
DROP_AFTER_CREATE,MyISAM,0,test,t31,id: 11,,0,,,
CREATE,MyISAM,0,test,t32,id: 12,,0,,,
DROP,MyISAM,0,test,t30,id: 8,,0,,,
DROP,MyISAM,0,test,t32,id: 12,,0,,,
CREATE,MyISAM,0,test,t40,id: 13,,0,,,
CREATE,InnoDB,0,test,t41,id: 14,,0,,,
CREATE,MyISAM,0,test,t42,id: 15,,0,,,
DROP,MyISAM,0,test,t42,id: 15,,0,,,
CREATE,InnoDB,0,test,t42,id: 16,,0,,,
DROP,MyISAM,0,test,t40,id: 13,,0,,,
DROP,InnoDB,0,test,t41,id: 14,,0,,,
DROP,InnoDB,0,test,t42,id: 16,,0,,,
CREATE,MyISAM,0,test,t50,id: 17,,0,,,
CREATE,MyISAM,0,test,t51,id: 18,,0,,,
RENAME,MyISAM,0,test,t50,id: 17,MyISAM,0,test,t52,id: 17
RENAME,MyISAM,0,test,t51,id: 18,MyISAM,0,test,t53,id: 18
RENAME,MyISAM,0,test,t52,id: 17,MyISAM,0,test,tmp,id: 17
RENAME,MyISAM,0,test,t53,id: 18,MyISAM,0,test,t52,id: 18
RENAME,MyISAM,0,test,tmp,id: 17,MyISAM,0,test,t53,id: 17
DROP,MyISAM,0,test,t52,id: 18,,0,,,
DROP,MyISAM,0,test,t53,id: 17,,0,,,
CREATE,Aria,0,test,t60,id: 19,,0,,,
CHANGE_INDEX,Aria,0,test,t60,id: 19,,0,,,
CHANGE_INDEX,Aria,0,test,t60,id: 19,,0,,,
DROP,Aria,0,test,t60,id: 19,,0,,,
CREATE,Aria,0,test,t70,id: 20,,0,,,
BULK_INSERT,Aria,0,test,t70,id: 20,,0,,,
BULK_INSERT,Aria,0,test,t70,id: 20,,0,,,
CREATE,Aria,0,test,t71,id: 21,,0,,,
BULK_INSERT,Aria,0,test,t71,id: 21,,0,,,
DROP,Aria,0,test,t70,id: 20,,0,,,
DROP,Aria,0,test,t71,id: 21,,0,,,
CREATE,MyISAM,0,test,t@00201,id: 22,,0,,,
DROP,MyISAM,0,test,t@00201,id: 22,,0,,,
CREATE,MyISAM,0,test,t80,id: 23,,0,,,
CREATE,VIEW,0,test,v1,,,0,,,
CREATE,TRIGGER,0,test,trg,,,0,,,
DROP,TRIGGER,0,test,trg,,,0,,,
DROP,VIEW,0,test,v1,,,0,,,
DROP,MyISAM,0,test,t80,id: 23,,0,,,
CREATE,MyISAM,0,test,t85,id: 24,,0,,,
ALTER,MyISAM,0,test,t85,id: 24,InnoDB,0,test,t85,id: 25
DROP,InnoDB,0,test,t85,id: 25,,0,,,
CREATE,DATABASE,0,mysqltest,,,,0,,,
CREATE,MyISAM,0,mysqltest,t90,id: 26,,0,,,
CREATE,InnoDB,0,mysqltest,t91,id: 27,,0,,,
ALTER,DATABASE,0,mysqltest,,,,0,,,
DROP,MyISAM,0,mysqltest,t90,id: 26,,0,,,
DROP,InnoDB,0,mysqltest,t91,id: 27,,0,,,
DROP,DATABASE,0,mysqltest,,,,0,,,
#
# Cleanup
#
DROP TABLE t_exists;
DROP TABLE t_exists_template;
#
# Reading backup ddl log file
#
DROP,MyISAM,0,test,t_exists,id: 1,,0,,,
DROP,MyISAM,0,test,t_exists_template,id: 2,,0,,,
disconnect con1;
......@@ -24,8 +24,6 @@ create table mysqltest.t91 (a int primary key, b int) engine=innodb;
alter database mysqltest character set utf8;
drop database mysqltest;
--source backup_log_print.inc
--echo #
--echo # MENT-222 bug testing
--echo #
......@@ -38,5 +36,4 @@ CREATE TABLE IF NOT EXISTS t_exists LIKE t_exists_template;
--echo #
DROP TABLE t_exists;
DROP TABLE t_exists_template;
--source backup_log_print.inc
disconnect con1;
--disable_query_log
--source include/print_ddl_log.inc
--connection con1
backup stage end;
backup stage start;
--connection default
--enable_query_log
......@@ -29,39 +29,3 @@ select count(a) from t1;
count(a)
0
drop table t1;
#
# MDEV-25292 Atomic CREATE OR REPLACE TABLE
#
# Test multi-byte characters in table name
set names utf8;
# Filename is too long because it is converted to @274e@274e@274e@274e...
# so each '❎' is 5 bytes in filesystem, 51 x 5 = 255 bytes
create table ❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int);
ERROR HY000: Can't create table `test`.`❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎` (errno: 36 "File name too long")
# Let's find out max length for '❎'...
# Acceptable name length: 50; Filename length: 254
# OK with 64-characters table name, filesystem name is 40 x 5 + 24 = 224 bytes
create table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int);
# Not OK with 65-characters table name
create table ttttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int);
ERROR 42000: Incorrect table name 'ttttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎'
show tables;
Tables_in_test
tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎
create or replace table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (y int);
show create table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎;
Table Create Table
tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ CREATE TABLE `tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎` (
`y` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
set @@debug_dbug="+d,ddl_log_create_after_save_backup", @debug_crash_counter=1;
create or replace table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (z int);
ERROR HY000: Lost connection to server during query
#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYD
#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYI
#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.frm
#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYD
#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYI
#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.frm
drop table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎;
set @@debug_dbug="";
# Non-windows specific create tests.
--source include/not_windows.inc
--source include/have_debug.inc
--source include/not_embedded.inc
#
# Bug#19479:mysqldump creates invalid dump
......@@ -43,64 +41,3 @@ create table t1(a int, b int, c int);
--echo "Try to select from the table. This should not crash the server"
select count(a) from t1;
drop table t1;
--echo #
--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE
--echo #
# This does not work on Windows because of max path limit 255
# (actually it does not work for path 254 already)
# Note: on Windows use ER_BAD_DB_ERROR instead of ER_CANT_CREATE_TABLE
# unless MDEV-28746 is fixed.
--echo # Test multi-byte characters in table name
set names utf8;
let $save_debug=`select @@debug_dbug`;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo # Filename is too long because it is converted to @274e@274e@274e@274e...
--echo # so each '❎' is 5 bytes in filesystem, 51 x 5 = 255 bytes
let $t= `select repeat('❎', 51)`;
--error ER_CANT_CREATE_TABLE
eval create table $t (x int);
# The below case is useful for experimenting on Windows
--echo # Let's find out max length for '❎'...
--disable_query_log
let $i= 50;
while ($i)
{
let $t= `select repeat('❎', $i)`;
--error 0,ER_CANT_CREATE_TABLE
eval create table $t (x int);
let $good_len= $i;
dec $i;
if (!$mysql_errno)
{
let $i= 0;
}
}
let $fn_len= `select $good_len * 5 + 4`; # 4 is extension length
eval drop table $t;
--enable_query_log
--echo # Acceptable name length: $good_len; Filename length: $fn_len
--echo # OK with 64-characters table name, filesystem name is 40 x 5 + 24 = 224 bytes
let $t= `select concat(repeat('t', 24), repeat('❎', 40))`;
eval create table $t (x int);
--echo # Not OK with 65-characters table name
let $t2= `select concat(repeat('t', 25), repeat('❎', 40))`;
--error ER_WRONG_TABLE_NAME
eval create table $t2 (x int);
show tables;
# Let's try atomic replace with such long name and see what happens
eval create or replace table $t (y int);
eval show create table $t;
set @@debug_dbug="+d,ddl_log_create_after_save_backup", @debug_crash_counter=1;
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
--error 2013
eval create or replace table $t (z int);
--replace_regex /-\w+-\w+-ttt/-PID-TID-ttt/
--list_files $MYSQLD_DATADIR/test *sql*
--enable_reconnect
--source include/wait_until_connected_again.inc
eval drop table $t;
eval set @@debug_dbug="$save_debug";
This diff is collapsed.
This diff is collapsed.
include/master-slave.inc
[connection master]
drop table if exists t1;
SET @old_debug= @@session.debug;
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp;
SET debug_dbug=@old_debug;
SHOW TABLES;
Tables_in_test
t1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection slave;
SHOW TABLES;
Tables_in_test
t1
connection master;
drop temporary table if exists tmp;
drop table t1;
include/rpl_end.inc
#
# Check CREATE OR REPLACE TABLE for test that requires DEBUG
#
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
--source include/master-slave.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
SET @old_debug= @@session.debug;
#
# MDEV-5854
# Interrupted CREATE OR REPLACE is written into binlog, and in a wrong format
#
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp;
SET debug_dbug=@old_debug;
SHOW TABLES;
show create table t1;
--sync_slave_with_master
SHOW TABLES;
--connection master
--disable_warnings
drop temporary table if exists tmp;
--enable_warnings
drop table t1;
--source include/rpl_end.inc
include/master-slave.inc
[connection master]
drop table if exists t1;
SET @old_debug= @@session.debug;
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp;
SET debug_dbug=@old_debug;
SHOW TABLES;
Tables_in_test
t1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection slave;
SHOW TABLES;
Tables_in_test
t1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection master;
drop temporary table if exists tmp;
drop table t1;
include/rpl_end.inc
#
# MDEV-25292 Atomic CREATE OR REPLACE TABLE
#
set @saved_debug_dbug= @@session.debug_dbug;
create table t1 (a int primary key) engine innodb;
insert t1 values (1), (2);
create table t2 (c int, a int constraint t1_a references t1 (a)) engine innodb;
insert into t2 values (2, 2);
lock tables t2 write, t1 write;
set session debug_dbug= '+d,atomic_replace_external_lock_fail';
create or replace table t2 (y int) as select * from t1;
ERROR HY000: The total number of locks exceeds the lock table size
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`c` int(11) DEFAULT NULL,
`a` int(11) DEFAULT NULL,
KEY `t1_a` (`a`),
CONSTRAINT `t1_a` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from t2;
c a
2 2
unlock tables;
drop tables t2, t1;
set session debug_dbug= @saved_debug_dbug;
# Test entry_pos in higher position, so drop chain executes before create chain
# (see commit message: On linking two chains together)
create table t1 (c int);
create or replace table t1 (a int, b int, key k (a), key k (b));
ERROR 42000: Duplicate key name 'k'
create or replace table t1 (a int, b int, key k (a), key k (b));
ERROR 42000: Duplicate key name 'k'
drop table t1;
#
# MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES
#
# Non-atomic CREATE OR REPLACE part:
#
set @saved_debug_dbug= @@session.debug_dbug;
set @@debug_dbug="+d,ddl_log_expensive_rename";
create table t1 (pk int primary key) engine=innodb;
create or replace table t2 (a int primary key references t1 (pk)) engine=innodb;
lock tables t1 write, t2 write;
create or replace table t2 (c1 int not null, c1 varchar(255) ) engine=innodb;
ERROR 42S21: Duplicate column name 'c1'
select * from t1;
pk
select * from t2;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
unlock tables;
drop tables t1;
set @@debug_dbug= @saved_debug_dbug;
#
# MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection
#
create table t1 (x int);
set @old_dbug= @@debug_dbug;
set @@debug_dbug= '+d,ha_end_bulk_insert_fail';
create or replace table t2 (y int) engine innodb select * from t1;
ERROR HY000: Out of memory.
set @@debug_dbug= @old_dbug;
drop table t1;
#
# Check CREATE OR REPLACE TABLE for test that requires DEBUG
#
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
--source include/master-slave.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
SET @old_debug= @@session.debug;
#
# MDEV-5854
# Interrupted CREATE OR REPLACE is written into binlog, and in a wrong format
#
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp;
SET debug_dbug=@old_debug;
SHOW TABLES;
show create table t1;
--sync_slave_with_master
SHOW TABLES;
show create table t1;
--connection master
--disable_warnings
drop temporary table if exists tmp;
--enable_warnings
drop table t1;
--source include/rpl_end.inc
--echo #
--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE
--echo #
set @saved_debug_dbug= @@session.debug_dbug;
create table t1 (a int primary key) engine innodb;
insert t1 values (1), (2);
create table t2 (c int, a int constraint t1_a references t1 (a)) engine innodb;
insert into t2 values (2, 2);
lock tables t2 write, t1 write;
set session debug_dbug= '+d,atomic_replace_external_lock_fail';
--error ER_LOCK_TABLE_FULL
create or replace table t2 (y int) as select * from t1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--list_files $MYSQLD_DATADIR/test *sql*
show create table t1;
show create table t2;
select * from t2;
unlock tables;
drop tables t2, t1;
set session debug_dbug= @saved_debug_dbug;
--echo # Test entry_pos in higher position, so drop chain executes before create chain
--echo # (see commit message: On linking two chains together)
create table t1 (c int);
--error ER_DUP_KEYNAME
create or replace table t1 (a int, b int, key k (a), key k (b));
--error ER_DUP_KEYNAME
create or replace table t1 (a int, b int, key k (a), key k (b));
drop table t1;
--echo #
--echo # MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES
--echo #
--echo # Non-atomic CREATE OR REPLACE part:
--echo #
set @saved_debug_dbug= @@session.debug_dbug;
set @@debug_dbug="+d,ddl_log_expensive_rename";
create table t1 (pk int primary key) engine=innodb;
create or replace table t2 (a int primary key references t1 (pk)) engine=innodb;
lock tables t1 write, t2 write;
--error ER_DUP_FIELDNAME
create or replace table t2 (c1 int not null, c1 varchar(255) ) engine=innodb;
select * from t1;
--error ER_TABLE_NOT_LOCKED
select * from t2;
unlock tables;
drop tables t1;
set @@debug_dbug= @saved_debug_dbug;
--echo #
--echo # MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection
--echo #
create table t1 (x int);
set @old_dbug= @@debug_dbug;
set @@debug_dbug= '+d,ha_end_bulk_insert_fail';
--error ER_OUT_OF_RESOURCES
create or replace table t2 (y int) engine innodb select * from t1;
set @@debug_dbug= @old_dbug;
drop table t1;
......@@ -428,6 +428,14 @@ a b c e
2 -1 1 1
drop table t1;
#
# Create or replace can delete a table on error
#
create table t1 (a int);
create or replace table t1 (a int default b, b int default a);
ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
show create table t1;
ERROR 42S02: Table 'test.t1' doesn't exist
#
# Refering to other columns
#
create or replace table t1 (a int default 1, b int default a);
......@@ -445,11 +453,11 @@ ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
create or replace table t1 (a int default b, b int default (1+1));
create or replace table t1 (a int default 1, b int as (c), c int as (a+1));
ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
CREATE OR REPLACE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a)));
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a)));
ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL);
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL);
ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
#
# Allow defaults to refer to not default fields
......
......@@ -307,6 +307,15 @@ insert into t1 values();
select * from t1;
drop table t1;
--echo #
--echo # Create or replace can delete a table on error
--echo #
create table t1 (a int);
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create or replace table t1 (a int default b, b int default a);
--error ER_NO_SUCH_TABLE
show create table t1;
--echo #
--echo # Refering to other columns
--echo #
......@@ -329,11 +338,11 @@ create or replace table t1 (a int default b, b int default (1+1));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create or replace table t1 (a int default 1, b int as (c), c int as (a+1));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
CREATE OR REPLACE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a)));
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a)));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL);
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL);
--echo #
--echo # Allow defaults to refer to not default fields
......
......@@ -397,8 +397,7 @@ c d
create or replace table t2 (a int, b blob, unique(b)) as select * from t1;
ERROR 23000: Duplicate entry 'bar' for key 'b'
select * from t2;
c d
3 bar
ERROR 42S02: Table 'test.t2' doesn't exist
create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1;
Warnings:
Warning 1062 Duplicate entry 'bar' for key 'b'
......
......@@ -480,6 +480,7 @@ delete from t2 using t1, t2 where t1.a=t2.c and t1.b='foo';
# CREATE...SELECT
--error ER_DUP_ENTRY
create or replace table t2 (a int, b blob, unique(b)) as select * from t1;
--error ER_NO_SUCH_TABLE
select * from t2;
create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1;
select * from t2;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
[ib]
[myisam]
[aria]
[aria_notrans]
[expensive_rename]
[lock_tables]
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -30,10 +30,13 @@ if ($engine_count == "")
let $crash_count=9;
let $crash_points='ddl_log_create_before_create_frm', 'storage_engine_middle_of_create', 'ddl_log_create_before_create_table', 'ddl_log_create_after_create_table', 'ddl_log_create_after_drop', 'ddl_log_create_before_binlog', 'ddl_log_create_after_prepare_eof', 'ddl_log_create_after_binlog', 'ddl_log_create_log_complete';
let $statement_count=3;
let $statement_count=6;
let $statements='CREATE TABLE t1 (a int)',
'CREATE OR REPLACE TABLE t2 (a int)',
'CREATE TABLE t1 LIKE const_table',
'CREATE TABLE t1 SELECT * from t2';
'CREATE OR REPLACE TABLE t2 LIKE const_table',
'CREATE TABLE t1 SELECT * from t2',
'CREATE OR REPLACE TABLE t2 SELECT * from const_table';
create table const_table (a int, b int) engine=myisam;
insert into const_table values (1,1),(2,2);
......@@ -51,8 +54,6 @@ while ($e < $engine_count)
inc $e;
let $engine=`select ELT($e, $engines)`;
let $default_engine=$engine;
# Note: $extra_option is not used. This dead code here is for conformity with
# other tests.
let $extra_option=;
if ($engine == "aria")
......
......@@ -419,7 +419,6 @@ create table t (old_table_field int);
create or replace table t as select 1 as b, 2 as b;
--error ER_DUP_FIELDNAME
create or replace temporary table t as select 1 as b, 2 as b;
drop table t;
create table t (new_table_field int);
--source include/show_binlog_events.inc
......
......@@ -1085,14 +1085,14 @@ create or replace table t as select 1 as b, 2 as b;
ERROR 42S21: Duplicate column name 'b'
create or replace temporary table t as select 1 as b, 2 as b;
ERROR 42S21: Duplicate column name 'b'
drop table t;
create table t (new_table_field int);
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t (old_table_field int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */
master-bin.000001 # Query # # ROLLBACK
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t (new_table_field int)
drop table t;
......@@ -682,16 +682,15 @@ create or replace table t as select 1 as b, 2 as b;
ERROR 42S21: Duplicate column name 'b'
create or replace temporary table t as select 1 as b, 2 as b;
ERROR 42S21: Duplicate column name 'b'
drop table t;
create table t (new_table_field int);
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t (old_table_field int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t (new_table_field int)
drop table t;
......@@ -9,8 +9,6 @@ CREATE TABLE t1 (a INT);
ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
INSERT INTO t1 VALUES (1),(2),(3);
ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a INT);
set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug='d,injecting_fault_writing';
INSERT INTO t1 VALUES (4),(5),(6);
......
......@@ -30,11 +30,8 @@ call mtr.add_suppression("Write to binary log failed: Error writing file*");
let $query= CREATE TABLE t1 (a INT);
source include/binlog_inject_error.inc;
--error ER_NO_SUCH_TABLE
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t1 (a INT);
let $query= INSERT INTO t1 VALUES (4),(5),(6);
source include/binlog_inject_error.inc;
......
......@@ -9,8 +9,6 @@ CREATE TABLE t1 (a INT);
ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
INSERT INTO t1 VALUES (1),(2),(3);
ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a INT);
set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug='d,injecting_fault_writing';
INSERT INTO t1 VALUES (4),(5),(6);
......
This diff is collapsed.
--- create_or_replace2.result
+++ create_or_replace2,stmt.reject
@@ -34,9 +34,11 @@
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN ( SELECT MAX(a) FROM t1 )
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` (
- `b` int(11) DEFAULT NULL
-) ENGINE=InnoDB
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp (b INT) ENGINE=InnoDB
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE tmp
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `tmp`
drop function f1;
drop table t1;
include/rpl_end.inc
......@@ -36,8 +36,6 @@ unlock tables;
--reap
--disconnect con1
--source include/show_binlog_events.inc
# Cleanup
drop function f1;
drop table t1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -341,7 +341,6 @@ SET(INNOBASE_SOURCES
include/srv0start.h
include/srw_lock.h
include/sux_lock.h
include/sql_funcs.h
include/trx0i_s.h
include/trx0purge.h
include/trx0rec.h
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment