diff options
author | unknown <mattiasj@mattias-jonssons-macbook.local> | 2007-11-20 11:21:00 +0100 |
---|---|---|
committer | unknown <mattiasj@mattias-jonssons-macbook.local> | 2007-11-20 11:21:00 +0100 |
commit | 4c31c41fdc3e105197f3e76476243e6c3210ba93 (patch) | |
tree | feeac50020914d1a4642df600d412a328930cb18 /mysql-test/r/partition_hash.result | |
parent | 011eb3dffe068db46ea4144eee242a4f2b203cf8 (diff) | |
download | mariadb-git-4c31c41fdc3e105197f3e76476243e6c3210ba93.tar.gz |
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id
returned when creating the new altered partitions. (because of wrong
linear hash mask)
Solution: Update the linear hash mask before using it for the new
altered table.
mysql-test/r/partition_hash.result:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
test result
mysql-test/t/partition_hash.test:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentatition fault
test case
sql/ha_partition.cc:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
Updating the linear hash mask before using it.
sql/sql_partition.cc:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
exporting the set_linear_hash_mask function (static -> non static)
sql/sql_partition.h:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
exporting the set_linear_hash_mask function (static -> non static)
Diffstat (limited to 'mysql-test/r/partition_hash.result')
-rw-r--r-- | mysql-test/r/partition_hash.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/partition_hash.result b/mysql-test/r/partition_hash.result index 72f036be099..94fefe77a77 100644 --- a/mysql-test/r/partition_hash.result +++ b/mysql-test/r/partition_hash.result @@ -1,4 +1,16 @@ drop table if exists t1; +CREATE TABLE t1 (c1 INT) +PARTITION BY HASH (c1) +PARTITIONS 15; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +ALTER TABLE t1 COALESCE PARTITION 13; +DROP TABLE t1; +CREATE TABLE t1 (c1 INT) +PARTITION BY LINEAR HASH (c1) +PARTITIONS 5; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +ALTER TABLE t1 COALESCE PARTITION 3; +DROP TABLE t1; create table t1 (a int unsigned) partition by hash(a div 2) partitions 4; |