diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-07-29 17:56:32 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-07-29 17:56:32 +0200 |
commit | a8e7535e335000908d4fe682dadfe23254c2e035 (patch) | |
tree | a14963565dedc00931b5b193647fcd943ad41374 /mysql-test | |
parent | a58b887c17c696c6e67adf0714254c57371d9cc2 (diff) | |
download | mariadb-git-a8e7535e335000908d4fe682dadfe23254c2e035.tar.gz |
Bug#46354, when defining partitions without subpartition definition after defining it with the first partition and using list partition caused crash, fixed by more error checks in parser
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/partition.result | 8 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 11 |
2 files changed, 18 insertions, 1 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 8e3fbde1ea8..9643478b96b 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1068,7 +1068,13 @@ partition by range (a) subpartition by hash(a) (partition p0 values less than (0), partition p1 values less than (1) (subpartition sp0)); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5 +create table t1 (a int, b int) +partition by list (a) +subpartition by hash(a) +(partition p0 values in (0), +partition p1 values in (1) (subpartition sp0)); +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5 create table t1 (a int) partition by hash (a) (partition p0 (subpartition sp0)); diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 8b4af201af2..18bcf84407b 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1020,6 +1020,17 @@ subpartition by hash(a) partition p1 values less than (1) (subpartition sp0)); # +# Bug 46354 Crash with subpartition +# +--error ER_PARSE_ERROR +create table t1 (a int, b int) +partition by list (a) +subpartition by hash(a) +(partition p0 values in (0), + partition p1 values in (1) (subpartition sp0)); + + +# # BUG 15961 No error when subpartition defined without subpartition by clause # --error ER_SUBPARTITION_ERROR |