Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/r/innodb-import-partition-rpl.result |
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] DROP TABLE IF EXISTS t1; # On slave set global innodb_file_per_table = 1; # On master set global innodb_file_per_table = 1; # Create partitioned table on master CREATE TABLE t1 ( i INT ) ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 3; CREATE TABLE t2 ( i INT ) ENGINE = InnoDB PARTITION BY KEY(i) PARTITIONS 3; INSERT INTO t1 VALUES (1),(111),(321); INSERT INTO t2 VALUES (0),(1),(2); FLUSH TABLES t1,t2 FOR EXPORT; include/sync_slave_sql_with_master.inc # set MYSQLD_DATADIR with master datadir to copy idb and cfg files backup: t1#P#p0 backup: t1#P#p1 backup: t1#P#p2 backup: t2#P#p0 backup: t2#P#p1 # On slave # check table created on slave SELECT * FROM t1; i 111 321 1 SELECT * FROM t2; i 0 1 2 # On master # DISCARD TABLESPACE on master.It will be also discarded from slave. UNLOCK TABLES; ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t2 DISCARD PARTITION p0,p1 TABLESPACE; include/sync_slave_sql_with_master.inc # Copy back ibd and cfg files on master restore: t1#P#p0 .ibd and .cfg files restore: t1#P#p1 .ibd and .cfg files restore: t1#P#p2 .ibd and .cfg files restore: t2#P#p0 .ibd and .cfg files restore: t2#P#p1 .ibd and .cfg files # Copy back ibd and cfg files on slave restore: t1#P#p0 .ibd and .cfg files restore: t1#P#p1 .ibd and .cfg files restore: t1#P#p2 .ibd and .cfg files restore: t2#P#p0 .ibd and .cfg files restore: t2#P#p1 .ibd and .cfg files # IMPORT TABLESPACE on master.It will be also imported on slave. ALTER TABLE t1 IMPORT TABLESPACE; SELECT * FROM t1; i 111 321 1 ALTER TABLE t2 IMPORT PARTITION p0,p1 TABLESPACE; SELECT * FROM t2; i 0 1 2 include/sync_slave_sql_with_master.inc # On slave # Verify table data on slave SELECT * FROM t1; i 111 321 1 SELECT * FROM t2; i 0 1 2 set global innodb_file_per_table = 1; set global innodb_file_per_table = 1; DROP TABLE t1; DROP TABLE t2; include/rpl_end.inc call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");