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

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.

mysql-test/r/partition_error.result:
  Bug#38719: Partitioning returns a different error code for
  a duplicate key error
  
  Added test for verification
mysql-test/t/partition_error.test:
  Bug#38719: Partitioning returns a different error code for
  a duplicate key error
  
  Added test for verification
This commit is contained in:
Mattias Jonsson
2009-02-18 21:29:30 +01:00
parent bf442fcaae
commit 830c42a06a
3 changed files with 24 additions and 2 deletions

View File

@ -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