diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-12-02 11:18:01 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-12-02 11:18:01 +0100 |
commit | 6538f19f9a73c1102f4ca240bda6aa58799aba6b (patch) | |
tree | cb5e6f2879630e8707a6a568eac7954d2fb398f6 /mysql-test/t/partition_mgm.test | |
parent | c82ff582226749c6049bdbbbdaa2031dc72d343b (diff) | |
download | mariadb-git-6538f19f9a73c1102f4ca240bda6aa58799aba6b.tar.gz |
Bug#40389: REORGANIZE PARTITION crashes when only using one partition
The non documented command 'ALTER PARTITION t REORGANIZE PARTITION'
(without any partitions!) which only make sense for nativly
partitioned engines, such as NDB, crashes the server if there was
no change of number of partitions.
The problem was wrong usage of fast_end_partition function,
which led to usage of a non initialized variable.
mysql-test/r/partition_mgm.result:
Bug#40389: REORGANIZE PARTITION crashes when only using one partition
Updated test result.
mysql-test/t/partition_mgm.test:
Bug#40389: REORGANIZE PARTITION crashes when only using one partition
Added new test case.
sql/partition_info.cc:
Bug#40389: REORGANIZE PARTITION crashes when only using one partition
Added DBUG_ASSERT to easier catch similar problems.
sql/sql_partition.cc:
Bug#40389: REORGANIZE PARTITION crashes when only using one partition
fast_end_partitions is called later in mysql_alter_table if
variable fast_alter_partition is set.
Diffstat (limited to 'mysql-test/t/partition_mgm.test')
-rw-r--r-- | mysql-test/t/partition_mgm.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test index 68da4a5b390..1f53989b4d4 100644 --- a/mysql-test/t/partition_mgm.test +++ b/mysql-test/t/partition_mgm.test @@ -4,6 +4,17 @@ 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 # |