summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2020-07-28 23:45:51 +1000
committerNikita Malyavin <nikitamalyavin@gmail.com>2020-07-31 17:32:29 +1000
commit91ebf1844f4fbc36edb66023332a045895d07cf5 (patch)
tree27bab16cf9d373e96a23a6282cfd36d081e374cb /mysql-test/suite/rpl
parent8a612314d0c9bc5b1db6f3998f26c28967915949 (diff)
downloadmariadb-git-91ebf1844f4fbc36edb66023332a045895d07cf5.tar.gz
MDEV-19338 InnoDB: Failing assertion: !cursor->index->is_committed()
Call mark_columns_per_binlog_row_image before find_row() to set up table->vcol_set early, so the virtual column value will be updated after record read (ha_rnd_pos/ha_index_next/etc) by table->update_virtual_fields() call
Diffstat (limited to 'mysql-test/suite/rpl')
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_virt.result20
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_virt.test27
2 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_row_virt.result b/mysql-test/suite/rpl/r/rpl_row_virt.result
new file mode 100644
index 00000000000..b670c63d9f1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_virt.result
@@ -0,0 +1,20 @@
+include/master-slave.inc
+[connection master]
+connection master;
+create table t1 (
+id int auto_increment,
+data varchar(32),
+virt tinyint as (1),
+primary key (id),
+key virt (virt)
+) engine=innodb default charset=utf8mb4;
+insert into t1 (data) values ('broken');
+update t1 set data='more broken';
+connection slave;
+select * from t1;
+id data virt
+1 more broken 1
+connection master;
+drop table t1;
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_virt.test b/mysql-test/suite/rpl/t/rpl_row_virt.test
new file mode 100644
index 00000000000..e79869cd8e4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_virt.test
@@ -0,0 +1,27 @@
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+--source include/have_innodb.inc
+connection master;
+
+create table t1 (
+ id int auto_increment,
+ data varchar(32),
+ virt tinyint as (1),
+ primary key (id),
+ key virt (virt)
+) engine=innodb default charset=utf8mb4;
+
+insert into t1 (data) values ('broken');
+
+update t1 set data='more broken';
+
+--sync_slave_with_master
+
+select * from t1;
+
+--connection master
+drop table t1;
+
+--sync_slave_with_master
+
+--source include/rpl_end.inc