summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 21:29:30 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 21:29:30 +0100
commite2cf7f14a09960b01e08d2c30a049dc25d7d0742 (patch)
tree38266050a8af42ed9caf70c71680a548d17a930a /mysql-test/t/partition_error.test
parent5b15e3de833363d19b7a05b0a1877600d6b01d44 (diff)
downloadmariadb-git-e2cf7f14a09960b01e08d2c30a049dc25d7d0742.tar.gz
Backport of bug#38719 from 6.0 to 5.1
handler::get_dup_key used the called handler for the info call, but used table->file handler for errkey. Fixed by using table->file->info instead.
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 41b904b876f..49632f95dfb 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -1,5 +1,5 @@
#
-# Simple test for the erroneos create statements using the
+# Simple test for the erroneos statements using the
# partition storage engine
#
-- source include/have_partition.inc
@@ -7,6 +7,19 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
+
+#
+# Bug#38719: Partitioning returns a different error code for a
+# duplicate key error
+CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a));
+-- error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (1),(1);
+DROP TABLE t1;
+CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a))
+PARTITION BY KEY (a) PARTITIONS 2;
+-- error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (1),(1);
+DROP TABLE t1;
#
# Bug#31931: Mix of handlers error message