summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authormattiasj@witty. <>2007-12-05 19:39:32 +0100
committermattiasj@witty. <>2007-12-05 19:39:32 +0100
commit5452a154d65c21ab08a05c1280b76d7d58ad68c7 (patch)
tree01656d6713f4dcd3adb009218353f8a7ddc7571c /mysql-test
parent1d7ac77479d22e25c58c37f36ba086e8ebb5356b (diff)
parenteac847f39b8e3737db6386e5f036628b98937286 (diff)
downloadmariadb-git-5452a154d65c21ab08a05c1280b76d7d58ad68c7.tar.gz
Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug30822
into witty.:/Users/mattiasj/clones/51to_push
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition_hash.result12
-rw-r--r--mysql-test/t/partition_hash.test16
2 files changed, 28 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;
diff --git a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test
index 52caaa8c8e9..362d5f747e9 100644
--- a/mysql-test/t/partition_hash.test
+++ b/mysql-test/t/partition_hash.test
@@ -10,6 +10,22 @@ drop table if exists t1;
--enable_warnings
#
+# Bug#30822: crash when COALESCE
+#
+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;
+
+#
# More partition pruning tests, especially on interval walking
#
create table t1 (a int unsigned)