Debian Codegraph @

mysql-test/suite/innodb/t/create_tablespace_replication.test

raw
1 ######## suite/innodb/t/innodb_wl6205.test #####
2 # #
3 # Testcase for worklog WL#6205: #
4 # InnoDB: Implement CREATE TABLESPACE for general use #
5 # Test scenario : #
6 # Test checks CREATE/DROP TABLESPACE with masters/slave #
7 # #
8 ######################################################################
9
10 -- source include/master-slave.inc
11
12 --echo # connection master
13 -- connection master
14 USE test;
15 --disable_warnings
16 DROP TABLE IF EXISTS t1;
17 --enable_warnings
18 CREATE TABLESPACE s_1 ADD DATAFILE 's_1.ibd' ENGINE InnoDB;
19 CREATE TABLESPACE s_2 ADD DATAFILE 's_2.ibd' ENGINE InnoDB;
20 CREATE TABLE t1 (a int) ENGINE=innodb TABLESPACE=s_1;
21 CREATE TABLE t2 (a int) ENGINE=innodb TABLESPACE=s_1;
22 --echo # Check tablespace on master
23 --source suite/innodb/include/show_i_s_tables.inc
24
25 INSERT INTO t1 VALUES ( 11);
26 INSERT INTO t2 VALUES ( 22);
27 SELECT * FROM t1;
28 SELECT * FROM t2;
29
30 --source include/sync_slave_sql_with_master.inc
31 --echo # connection slave
32 --connection slave
33 --echo # Check tablespace on slave
34 --source suite/innodb/include/show_i_s_tables.inc
35 USE test;
36 SHOW TABLES;
37 SHOW CREATE TABLE t1;
38 SHOW CREATE TABLE t2;
39
40 --echo # connection master
41 -- connection master
42 USE test;
43 DROP TABLE t1,t2;
44 DROP TABLESPACE s_1;
45 --source include/sync_slave_sql_with_master.inc
46
47 --echo # connection slave
48 --connection slave
49 --source suite/innodb/include/show_i_s_tables.inc
50
51 --echo # connection master
52 -- connection master
53 USE test;
54 DROP TABLESPACE s_2;
55
56 --source include/rpl_end.inc