1CREATE TABLE t1(a INT) ENGINE=InnoDB;
2INSERT INTO t1 VALUES (1), (2), (3);
3CREATE TABLE t2(a INT) ENGINE=InnoDB;
4INSERT INTO t2 VALUES (4), (5), (6);
5CREATE TABLE p (
6a int
7) ENGINE=InnoDB
8PARTITION BY RANGE (a)
9(PARTITION p0 VALUES LESS THAN (100),
10PARTITION p1 VALUES LESS THAN (200),
11PARTITION p2 VALUES LESS THAN (300),
12PARTITION p3 VALUES LESS THAN (400));
13INSERT INTO p VALUES (1), (101), (201), (301);
14CREATE TABLE isam_t1(a INT) ENGINE=MyISAM;
15INSERT INTO isam_t1 VALUES (1), (2), (3);
16CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
17INSERT INTO isam_t2 VALUES (4), (5), (6);
18CREATE TABLE isam_p (
19a int
20) ENGINE=MyISAM
21PARTITION BY RANGE (a)
22(PARTITION p0 VALUES LESS THAN (100),
23PARTITION p1 VALUES LESS THAN (200),
24PARTITION p2 VALUES LESS THAN (300),
25PARTITION p3 VALUES LESS THAN (400));
26INSERT INTO isam_p VALUES (1), (101), (201), (301);
27DROP TABLE t1;
28DROP TABLE t2;
29CREATE TABLE t2(a INT) ENGINE=InnoDB;
30INSERT INTO t2 VALUES (40), (50), (60);
31ALTER TABLE p DROP PARTITION p0;
32ALTER TABLE p DROP PARTITION p1;
33ALTER TABLE p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
34ALTER TABLE p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
35INSERT INTO p VALUES (401), (501);
36DROP TABLE isam_t1;
37DROP TABLE isam_t2;
38CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
39INSERT INTO isam_t2 VALUES (40), (50), (60);
40ALTER TABLE isam_p DROP PARTITION p0;
41ALTER TABLE isam_p DROP PARTITION p1;
42ALTER TABLE isam_p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
43ALTER TABLE isam_p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
44INSERT INTO isam_p VALUES (401), (501);
45# shutdown server
46# remove datadir
47# xtrabackup move back
48# restart
49SELECT * from p;
50a
51201
52301
53401
54501
55SELECT * from isam_p;
56a
57201
58301
59401
60501
61DROP TABLE isam_p;
62DROP TABLE isam_t2;
63DROP TABLE p;
64DROP TABLE t2;
65