From b10340998f33a04452a499ae8d13f8af7e1e69b0 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 Feb 2019 23:32:02 +0100 Subject: MDEV-18748 REPLACE doesn't work with unique blobs on MyISAM table on long unique conflict, set table->file->dup_ref for engines that support it --- mysql-test/main/long_unique_bugs.result | 4 ++++ mysql-test/main/long_unique_bugs.test | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'mysql-test/main') diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index 05ddceb63f8..5de7566c8a3 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -53,3 +53,7 @@ create temporary table t1 (f blob, unique(f)) engine=innodb; insert into t1 values (1); replace into t1 values (1); drop table t1; +create table t (b blob, unique(b)) engine=myisam; +insert into t values ('foo'); +replace into t values ('foo'); +drop table t; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index f00b3171a54..0246ea7962a 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -64,3 +64,11 @@ create temporary table t1 (f blob, unique(f)) engine=innodb; insert into t1 values (1); replace into t1 values (1); drop table t1; + +# +# MDEV-18748 REPLACE doesn't work with unique blobs on MyISAM table +# +create table t (b blob, unique(b)) engine=myisam; +insert into t values ('foo'); +replace into t values ('foo'); +drop table t; -- cgit v1.2.1