Commit 93cde729 authored by unknown's avatar unknown

BUG#19310: Add partition using InnoDB crashes MySQL Server

Added new test case


mysql-test/r/partition_innodb.result:
  Added new test case
mysql-test/t/partition_innodb.test:
  Added new test case
parent d13c5aa3
......@@ -79,6 +79,14 @@ INTO @exp_row_count;
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
# 1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
drop table t1;
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
ENGINE=InnoDB
PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
# This statement crashes the server.
# CREATE partitioned table with three partitions in one step
# would be harmless.
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t0_aux;
......
......@@ -47,6 +47,16 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
--echo # 1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
drop table t1;
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
ENGINE=InnoDB
PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
--echo # This statement crashes the server.
--echo # CREATE partitioned table with three partitions in one step
--echo # would be harmless.
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
--disable_warnings
DROP VIEW IF EXISTS v1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment