summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-01-10 16:20:28 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-01-10 16:20:28 +0100
commitc574a9c414f817975f75a08744b2f0bea1232ff3 (patch)
tree14b8f2c7135475941207613ee7885046f1c2f071 /mysql-test/t/partition_error.test
parent078ed281817d370faa3e7f563cf32568528b3591 (diff)
downloadmariadb-git-c574a9c414f817975f75a08744b2f0bea1232ff3.tar.gz
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.
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index d3f10628254..aa26fa29db9 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -11,6 +11,20 @@ drop table if exists t1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo #
+--echo # Bug#57924: crash when creating partitioned table with
+--echo # multiple columns in the partition key
+--echo #
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+
+--echo #
--echo # Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
--echo #
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);