[Commits] f6c1055ad45: MDEV-18901 Wrong results after ADD UNIQUE INDEX(blob_column)
revision-id: f6c1055ad45070e79f991a41b8c20af30d728464 (mariadb-10.4.3-88-gf6c1055ad45) parent(s): d260871fccc44d92ad8b7dec674a791c46123788 author: Sachin committer: Sachin timestamp: 2019-03-19 16:43:43 +0530 message: MDEV-18901 Wrong results after ADD UNIQUE INDEX(blob_column) Add test case for MDEV-18901 as MDEV-18967 and MDEV-18922 solves this issue --- mysql-test/main/long_unique_bugs.result | 24 ++++++++++++++++++++++++ mysql-test/main/long_unique_bugs.test | 22 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index a0850c0b9f2..9a1ce1a3482 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -213,3 +213,27 @@ select * from t1; data A DROP TABLE t1; +CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('f'), ('o'), ('o'); +SELECT * INTO OUTFILE 'load.data' from t1; +ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); +SELECT * FROM t1; +data +f +o +ALTER TABLE t1 ADD SYSTEM VERSIONING ; +SELECT * FROM t1; +data +f +o +REPLACE INTO t1 VALUES ('f'), ('o'), ('o'); +SELECT * FROM t1; +data +f +o +LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1; +SELECT * FROM t1; +data +f +o +DROP TABLE t1; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index d257ab511b9..14dfc3786fd 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -250,3 +250,25 @@ select * from t1; DROP TABLE t1; --let $datadir= `select @@datadir` --remove_file $datadir/test/load.data + +# +# 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'); +SELECT * INTO OUTFILE 'load.data' from t1; + +ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); +SELECT * FROM t1; +ALTER TABLE t1 ADD SYSTEM VERSIONING ; +SELECT * FROM t1; +REPLACE INTO t1 VALUES ('f'), ('o'), ('o'); +SELECT * FROM t1; +# This should be equivalent to the REPLACE above +LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +--let $datadir= `select @@datadir` +--remove_file $datadir/test/load.data
participants (1)
-
sachin.setiya@mariadb.com