mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
907df8e3c8
mysql-test/r/partition_mgm.result: Added new test case mysql-test/t/partition_mgm.test: Added new test case sql/ha_partition.cc: Fixed memory overwrite, added new variable for memory check Problem was when reorganising partitions, the file handles got in the wrong place. sql/ha_partition.h: Added new variable for debugging mostly
38 lines
1.4 KiB
Text
38 lines
1.4 KiB
Text
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
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2 */
|
|
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
|
|
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
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1 */
|
|
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
|
|
drop table t1;
|
|
create table t1 (a int)
|
|
partition by list (a)
|
|
subpartition by hash (a)
|
|
(partition p11 values in (1,2),
|
|
partition p12 values in (3,4));
|
|
alter table t1 REORGANIZE partition p11, p12 INTO
|
|
(partition p1 values in (1,2,3,4));
|
|
alter table t1 REORGANIZE partition p1 INTO
|
|
(partition p11 values in (1,2),
|
|
partition p12 values in (3,4));
|
|
drop table t1;
|