Commit c23d4700 authored by Sachin's avatar Sachin

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
parent 625aa232
......@@ -195,3 +195,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;
......@@ -228,3 +228,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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment