2006-05-27 22:34:13 +02:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
|
|
|
|
PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2;
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`f_date` date DEFAULT NULL,
|
|
|
|
`f_varchar` varchar(30) DEFAULT NULL
|
2006-06-15 16:51:24 +02:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2 */
|
2006-06-20 22:38:42 +02:00
|
|
|
hello/master-data/test/t1#P#p0.MYD
|
|
|
|
hello/master-data/test/t1#P#p0.MYI
|
|
|
|
hello/master-data/test/t1#P#p1.MYD
|
|
|
|
hello/master-data/test/t1#P#p1.MYI
|
|
|
|
hello/master-data/test/t1.frm
|
|
|
|
hello/master-data/test/t1.par
|
2006-05-27 22:34:13 +02:00
|
|
|
ALTER TABLE t1 COALESCE PARTITION 1;
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`f_date` date DEFAULT NULL,
|
|
|
|
`f_varchar` varchar(30) DEFAULT NULL
|
2006-06-15 16:51:24 +02:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1 */
|
2006-06-20 22:38:42 +02:00
|
|
|
hello/master-data/test/t1#P#p0.MYD
|
|
|
|
hello/master-data/test/t1#P#p0.MYI
|
|
|
|
hello/master-data/test/t1.frm
|
|
|
|
hello/master-data/test/t1.par
|