1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#57924: crash when creating partitioned table with

multiple columns in the partition key

ndb crash if duplicate columns in the partitioning key.

Backport from mysql-5.1-telco-7.0, see bug#53354.

Changed from case sensitive field name comparision
to non case sensitive too.

mysql-test/r/partition_error.result:
  updated result
mysql-test/t/partition_error.test:
  Added test for the error in non-ndb partitioned table.
sql/sql_partition.cc:
  Added check for duplicated field names in the
  partitioning key.
This commit is contained in:
Mattias Jonsson
2011-01-10 16:20:28 +01:00
parent 078ed28181
commit c574a9c414
5 changed files with 58 additions and 0 deletions

View File

@ -1,5 +1,18 @@
drop table if exists t1;
#
# Bug#57924: crash when creating partitioned table with
# multiple columns in the partition key
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
PARTITION BY KEY(a, b, a);
ERROR HY000: Field in list of fields for partition function not found in table
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
PARTITION BY KEY(A, b);
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
PARTITION BY KEY(a, b, A);
ERROR HY000: Field in list of fields for partition function not found in table
#
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
#
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);