polardbxengine/mysql-test/suite/innodb/r/create_tablespace_replicati...

66 lines
2.4 KiB
Plaintext

include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
# connection master
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLESPACE s_1 ADD DATAFILE 's_1.ibd' ENGINE InnoDB;
CREATE TABLESPACE s_2 ADD DATAFILE 's_2.ibd' ENGINE InnoDB;
CREATE TABLE t1 (a int) ENGINE=innodb TABLESPACE=s_1;
CREATE TABLE t2 (a int) ENGINE=innodb TABLESPACE=s_1;
# Check tablespace on master
=== information_schema.innodb_tables and innodb_tablespaces ===
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
mtr/global_suppressions mtr/global_suppressions 33 6 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 6 Dynamic 0 Single
test/t1 s_1 161 6 Dynamic 0 General
test/t2 s_1 161 6 Dynamic 0 General
INSERT INTO t1 VALUES ( 11);
INSERT INTO t2 VALUES ( 22);
SELECT * FROM t1;
a
11
SELECT * FROM t2;
a
22
include/sync_slave_sql_with_master.inc
# connection slave
# Check tablespace on slave
=== information_schema.innodb_tables and innodb_tablespaces ===
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
mtr/global_suppressions mtr/global_suppressions 33 6 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 6 Dynamic 0 Single
test/t1 s_1 161 6 Dynamic 0 General
test/t2 s_1 161 6 Dynamic 0 General
USE test;
SHOW TABLES;
Tables_in_test
t1
t2
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) /*!50100 TABLESPACE `s_1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) /*!50100 TABLESPACE `s_1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
# connection master
USE test;
DROP TABLE t1,t2;
DROP TABLESPACE s_1;
include/sync_slave_sql_with_master.inc
# connection slave
=== information_schema.innodb_tables and innodb_tablespaces ===
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
mtr/global_suppressions mtr/global_suppressions 33 6 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 6 Dynamic 0 Single
# connection master
USE test;
DROP TABLESPACE s_2;
include/rpl_end.inc