1 DROP TABLE IF EXISTS t1;
2 CREATE TABLE t1 (a INT PRIMARY KEY)
6 INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
7 ALTER TABLE t1 REORGANIZE PARTITION;
9 create table t1 (a int)
10 partition by range (a)
11 subpartition by key (a)
12 (partition p0 values less than (10) (subpartition sp00, subpartition sp01),
13 partition p1 values less than (20) (subpartition sp10, subpartition sp11));
14 alter table t1 reorganize partition p0 into
15 (partition p0 values less than (10) (subpartition sp00,
16 subpartition sp01, subpartition sp02));
17 ERROR HY000: Wrong number of subpartitions defined, mismatch with previous setting
19 CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
20 PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2;
23 t1 CREATE TABLE `t1` (
24 `f_date` date DEFAULT NULL,
25 `f_varchar` varchar(30) DEFAULT NULL
26 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
27 /*!50100 PARTITION BY HASH (YEAR(f_date))
29 ALTER TABLE t1 COALESCE PARTITION 1;
32 t1 CREATE TABLE `t1` (
33 `f_date` date DEFAULT NULL,
34 `f_varchar` varchar(30) DEFAULT NULL
35 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
36 /*!50100 PARTITION BY HASH (YEAR(f_date))
39 create table t1 (a int)
41 subpartition by hash (a)
42 (partition p11 values in (1,2),
43 partition p12 values in (3,4));
44 alter table t1 REORGANIZE partition p11, p12 INTO
45 (partition p1 values in (1,2,3,4));
46 alter table t1 REORGANIZE partition p1 INTO
47 (partition p11 values in (1,2),
48 partition p12 values in (3,4));
50 CREATE TABLE t1 (a INT)
51 /*!50100 PARTITION BY HASH (a)
58 t1 CREATE TABLE `t1` (
59 `a` int(11) DEFAULT NULL
60 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
61 /*!50100 PARTITION BY HASH (a)
64 CREATE TABLE t1 (a INT)
65 /*!50100 PARTITION BY HASH (a)
66 -- with a single line comment embedded
70 t1 CREATE TABLE `t1` (
71 `a` int(11) DEFAULT NULL
72 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
73 /*!50100 PARTITION BY HASH (a)
76 CREATE TABLE t1 (a INT)
77 /*!50100 PARTITION BY HASH (a)
81 t1 CREATE TABLE `t1` (
82 `a` int(11) DEFAULT NULL
83 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
84 /*!50100 PARTITION BY HASH (a)
87 CREATE TABLE t1 (a INT) /*!50100 PARTITION BY HASH (a) PARTITIONS 5 */;
90 t1 CREATE TABLE `t1` (
91 `a` int(11) DEFAULT NULL
92 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
93 /*!50100 PARTITION BY HASH (a)