summaryrefslogtreecommitdiff
path: root/mysql-test/main/long_unique_bugs.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-04-28 01:58:31 +0200
committerSergei Golubchik <serg@mariadb.org>2022-04-28 13:17:13 +0200
commitaf810407f78b7f792a9bb8c47c8c532eb3b3a758 (patch)
tree9e60e0d7c1223e14e5da16e4f57831481220763e /mysql-test/main/long_unique_bugs.test
parent0e4bc67eab9bbe75109b88bdcf1b3631fce35c04 (diff)
downloadmariadb-git-af810407f78b7f792a9bb8c47c8c532eb3b3a758.tar.gz
MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect the next error message in the next statement
Diffstat (limited to 'mysql-test/main/long_unique_bugs.test')
-rw-r--r--mysql-test/main/long_unique_bugs.test17
1 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index b0e6c2b3bf6..02852cf08e5 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -233,7 +233,6 @@ DROP TABLE t1;
#
# MDEV-18901 Wrong results after ADD UNIQUE INDEX(blob_column)
#
---source include/have_innodb.inc
CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('f'), ('o'), ('o');
@@ -279,7 +278,6 @@ DROP TABLE t1;
# MDEV-18820 Assertion `lock_table_has(trx, index->table, LOCK_IX)' failed in lock_rec_insert_check_and_lock upon INSERT into table with blob key'
#
---source include/have_innodb.inc
set innodb_lock_wait_timeout= 10;
CREATE TABLE t1 (
@@ -385,4 +383,19 @@ DELETE FROM t;
DROP TABLE t;
+--echo #
+--echo # MDEV-28098 incorrect key in "dup value" error after long unique
+--echo #
+create table t1 (v3 int primary key, v2 text(100) unique not null, v1 int unique) engine=innodb;
+insert into t1 values ( -32768 , -128 , 58 ) , ( -1 , 44 , -128 );
+create table t2 (v6 int primary key, v5 text, a int not null) engine=innodb;
+insert into t2 values ( 50 , 61 , -1 ) , ( -2147483648 , -128 , 0 );
+--error ER_DUP_ENTRY
+update t1 set v2 = 1, v3 = -128;
+--error ER_DUP_ENTRY
+update t1,t2 set v1 = v2 , v5 = 0;
+drop table t1, t2;
+
+--echo #
--echo # End of 10.4 tests
+--echo #