mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +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
32 lines
898 B
Text
32 lines
898 B
Text
-- source include/have_partition.inc
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
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;
|
|
|
|
--replace_result $MYSQLTEST_VARDIR "hello"
|
|
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
|
ALTER TABLE t1 COALESCE PARTITION 1;
|
|
SHOW CREATE TABLE t1;
|
|
--replace_result $MYSQLTEST_VARDIR "hello"
|
|
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
|
drop table t1;
|
|
#
|
|
# Bug 20767: REORGANIZE partition crashes
|
|
#
|
|
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;
|