/
mdev_30014.test
45 lines (39 loc) · 1.22 KB
/
mdev_30014.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--echo #
--echo # MDEV-30014 heap-use-after-free in ha_spider::lock_tables(), highly sporadic SIGSEGV in intern_close_table
--echo #
--disable_query_log
--disable_result_log
--source ../../t/test_init.inc
--enable_result_log
--enable_query_log
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
create table t1 (c int);
create table t2 (c int) ENGINE=Spider
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t1"';
CREATE TABLE t3 (c INT KEY) ENGINE=Spider;
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
LOCK TABLE t2 WRITE,t3 WRITE;
CREATE TABLE t4 (c INT) ENGINE=Spider;
FLUSH NO_WRITE_TO_BINLOG TABLES t4 WITH READ LOCK;
UNLOCK TABLES;
drop table t1, t2, t3, t4;
# This is a test case in MDEV-29456 but it is more like the above
# case.
create table t1 (c int);
create table t2 (c int) ENGINE=Spider
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t1"';
CREATE TABLE t3 (c INT KEY) ENGINE=Spider;
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
LOCK TABLE t2 WRITE, t3 WRITE;
UNLOCK TABLES;
drop table t1, t2, t3;
drop server srv;
--disable_query_log
--disable_result_log
--source ../../t/test_deinit.inc
--enable_result_log
--enable_query_log
--echo #
--echo # end of test mdev_30014
--echo #