summaryrefslogtreecommitdiff
path: root/mysql-test/t/errors.test
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-05-27 20:01:43 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-05-27 20:01:43 +0400
commitf1e1d1bd005f7b5d732c560f04e1f05608e2671f (patch)
tree74ba6d5c624ff12b86aa5a763515ad02800307a8 /mysql-test/t/errors.test
parent8fa381fda36f3386a7116ff57dc93329891611df (diff)
downloadmariadb-git-f1e1d1bd005f7b5d732c560f04e1f05608e2671f.tar.gz
Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
For BINARY(N) strip trailing zeroes to make the error message nice-looking mysql-test/r/errors.result: test case mysql-test/r/type_binary.result: result fix mysql-test/t/errors.test: test case sql/key.cc: For BINARY(N) strip trailing zeroes to make the error message nice-looking
Diffstat (limited to 'mysql-test/t/errors.test')
-rw-r--r--mysql-test/t/errors.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test
index 5e53eaf0a52..f308c340645 100644
--- a/mysql-test/t/errors.test
+++ b/mysql-test/t/errors.test
@@ -140,3 +140,18 @@ SET sql_quote_show_create= _utf8 x'5452C39C45';
--error ER_WRONG_VALUE_FOR_VAR
SET sql_quote_show_create=_latin1 x'5452DC45';
+--echo #
+--echo # Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
+--echo #
+CREATE TABLE t1(c1 BINARY(10), c2 BINARY(10), c3 BINARY(10),
+PRIMARY KEY(c1,c2,c3));
+INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
+--error ER_DUP_ENTRY
+INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
+DROP TABLE t1;
+
+CREATE TABLE t1 (f1 VARBINARY(19) PRIMARY KEY);
+INSERT INTO t1 VALUES ('abc\0\0');
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES ('abc\0\0');
+DROP TABLE t1;