summaryrefslogtreecommitdiff
path: root/mysql-test/main/long_unique_bugs.test
diff options
context:
space:
mode:
authorSachin <sachin.setiya@mariadb.com>2020-05-25 15:29:44 +0530
committerSachin <sachin.setiya@mariadb.com>2020-06-07 12:07:36 +0530
commite208f91ba8e8d674b276d52ba1645e4fef1f974a (patch)
tree9d6580218e9cfd16cd5848e4db6b4e8b9766e4eb /mysql-test/main/long_unique_bugs.test
parentc7a2fb1e086f9eaf03fe437326ecf32329b22e37 (diff)
downloadmariadb-git-e208f91ba8e8d674b276d52ba1645e4fef1f974a.tar.gz
MDEV-21804 Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB
Problem:- Calling mark_columns_per_binlog_row_image() earlier may change the result of mark_virtual_columns_for_write() , Since it can set the bitmap on for virtual column, and henceforth mark_virtual_column_deps(field) will never be called in mark_virtual_column_with_deps. This bug is not specific for long unique, It also fails for this case create table t2(id int primary key, a blob, b varchar(20) as (LEFT(a,2)));
Diffstat (limited to 'mysql-test/main/long_unique_bugs.test')
-rw-r--r--mysql-test/main/long_unique_bugs.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index 13a4e1367a0..e91c46ca90c 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -340,3 +340,19 @@ while ($count)
--eval $insert_stmt
--enable_query_log
drop table t1;
+
+#
+# MDEV-21804 Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB
+#
+
+--source include/have_binlog_format_row.inc
+SET binlog_row_image= NOBLOB;
+CREATE TABLE t1 (pk INT PRIMARY KEY, a text ,UNIQUE(a) using hash);
+INSERT INTO t1 VALUES (1,'foo');
+
+create table t2(id int primary key, a blob, b varchar(20) as (LEFT(a,2)));
+INSERT INTO t2 VALUES (1, 'foo', default);
+
+# Cleanup
+DROP TABLE t1, t2;
+SET binlog_row_image= FULL;