mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
df8543868d
conflicts: Text conflict in client/mysqltest.cc Text conflict in mysql-test/include/wait_until_connected_again.inc Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl Text conflict in mysql-test/r/events_bugs.result Text conflict in mysql-test/r/log_state.result Text conflict in mysql-test/r/myisam_data_pointer_size_func.result Text conflict in mysql-test/r/mysqlcheck.result Text conflict in mysql-test/r/query_cache.result Text conflict in mysql-test/r/status.result Text conflict in mysql-test/suite/binlog/r/binlog_index.result Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_packet.result Text conflict in mysql-test/suite/rpl/t/rpl_packet.test Text conflict in mysql-test/t/disabled.def Text conflict in mysql-test/t/events_bugs.test Text conflict in mysql-test/t/log_state.test Text conflict in mysql-test/t/myisam_data_pointer_size_func.test Text conflict in mysql-test/t/mysqlcheck.test Text conflict in mysql-test/t/query_cache.test Text conflict in mysql-test/t/rpl_init_slave_func.test Text conflict in mysql-test/t/status.test
90 lines
2.5 KiB
Text
90 lines
2.5 KiB
Text
-- source include/have_partition.inc
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
|
|
#
|
|
# Bug 40389: REORGANIZE PARTITION crashes when only using one partition
|
|
#
|
|
CREATE TABLE t1 (a INT PRIMARY KEY)
|
|
ENGINE MYISAM
|
|
PARTITION BY HASH (a)
|
|
PARTITIONS 1;
|
|
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
|
ALTER TABLE t1 REORGANIZE PARTITION;
|
|
DROP TABLE t1;
|
|
|
|
#
|
|
# Bug 21143: mysqld hang when error in number of subparts in
|
|
# REORGANIZE command
|
|
#
|
|
create table t1 (a int)
|
|
partition by range (a)
|
|
subpartition by key (a)
|
|
(partition p0 values less than (10) (subpartition sp00, subpartition sp01),
|
|
partition p1 values less than (20) (subpartition sp10, subpartition sp11));
|
|
|
|
-- error ER_PARTITION_WRONG_NO_SUBPART_ERROR
|
|
alter table t1 reorganize partition p0 into
|
|
(partition p0 values less than (10) (subpartition sp00,
|
|
subpartition sp01, subpartition sp02));
|
|
drop table t1;
|
|
|
|
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
|
|
PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2;
|
|
SHOW CREATE TABLE t1;
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
|
|
-- file_exists $MYSQLD_DATADIR/test/t1.frm
|
|
-- file_exists $MYSQLD_DATADIR/test/t1.par
|
|
ALTER TABLE t1 COALESCE PARTITION 1;
|
|
SHOW CREATE TABLE t1;
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
|
|
-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
|
|
-- file_exists $MYSQLD_DATADIR/test/t1.frm
|
|
-- file_exists $MYSQLD_DATADIR/test/t1.par
|
|
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;
|
|
#
|
|
# Verification tests for bug#14326
|
|
#
|
|
--error ER_PARSE_ERROR
|
|
CREATE TABLE t1 (a INT)
|
|
/*!50100 PARTITION BY HASH (a)
|
|
/* Test
|
|
of multi-line
|
|
comment */
|
|
PARTITIONS 5 */;
|
|
CREATE TABLE t1 (a INT)
|
|
/*!50100 PARTITION BY HASH (a)
|
|
-- with a single line comment embedded
|
|
PARTITIONS 5 */;
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (a INT)
|
|
/*!50100 PARTITION BY HASH (a)
|
|
PARTITIONS 5 */;
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (a INT) /*!50100 PARTITION BY HASH (a) PARTITIONS 5 */;
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|