Debian Codegraph @

mysql-test/suite/rpl/r/create_or_replace2.result

raw
1 include/master-slave.inc
2 [connection master]
3 #
4 # MDEV-6525 ; Problems with CREATE OR REPLACE under lock
5 #
6 CREATE TABLE t1 (a INT) ENGINE=InnoDB;
7 CREATE FUNCTION f1() RETURNS INT RETURN ( SELECT MAX(a) FROM t1 );
8 connect con1,localhost,root,,test;
9 CREATE TEMPORARY TABLE tmp (b INT) ENGINE=InnoDB;
10 LOCK TABLE t1 WRITE;
11 SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
12 CREATE OR REPLACE TABLE t1 LIKE tmp;
13 SHOW CREATE TABLE t1;
14 Table Create Table
15 t1 CREATE TABLE `t1` (
16 `b` int(11) DEFAULT NULL
17 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
18 connection default;
19 set session lock_wait_timeout=1;
20 SELECT f1();
21 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
22 set session lock_wait_timeout=@@global.lock_wait_timeout;
23 SELECT f1();
24 connection con1;
25 unlock tables;
26 connection default;
27 ERROR 42S22: Unknown column 'a' in 'SELECT'
28 disconnect con1;
29 drop function f1;
30 drop table t1;
31 include/rpl_end.inc