summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-05-11 17:27:23 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-10-10 00:20:34 +0300
commita92f3146d22cb3b290228c0e66eb1ea6c7b7c373 (patch)
tree012598feb31ab78c15501db3a17f7919945131d4 /mysql-test/suite/versioning
parent647a38818a44012c22128e0e1cad96739aa8a5c2 (diff)
downloadmariadb-git-a92f3146d22cb3b290228c0e66eb1ea6c7b7c373.tar.gz
MDEV-19406 Assertion on updating view of join with versioned table
TABLE::mark_columns_needed_for_update(): use_all_columns() assigns pointer of all_set into read_set and write_set, but this is not good since all_set is changed later by TABLE::mark_columns_used_by_index_no_reset(). Do column_bitmaps_signal() whenever we change read_set/write_set.
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r--mysql-test/suite/versioning/r/update.result11
-rw-r--r--mysql-test/suite/versioning/t/update.test15
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result
index af263a63fae..eaa8549b38a 100644
--- a/mysql-test/suite/versioning/r/update.result
+++ b/mysql-test/suite/versioning/r/update.result
@@ -265,3 +265,14 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
disconnect con1;
connection default;
drop table t1;
+#
+# MDEV-19406 Assertion on updating view of join with versioned table
+#
+create or replace table t1 (pk int primary key, a date, b int, index(b)) engine=innodb with system versioning;
+create or replace table t2 (c int);
+create or replace view v as select * from t1 join t2;
+insert into t1 (pk) values (1);
+update t1 set a= '2012-12-12';
+update v set a= '2000-01-01' order by b limit 1;
+drop view v;
+drop table t1, t2;
diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test
index a9550564a15..e41c7d15995 100644
--- a/mysql-test/suite/versioning/t/update.test
+++ b/mysql-test/suite/versioning/t/update.test
@@ -177,4 +177,19 @@ connection default;
reap;
drop table t1;
+--echo #
+--echo # MDEV-19406 Assertion on updating view of join with versioned table
+--echo #
+--disable_warnings
+create or replace table t1 (pk int primary key, a date, b int, index(b)) engine=innodb with system versioning;
+create or replace table t2 (c int);
+create or replace view v as select * from t1 join t2;
+
+insert into t1 (pk) values (1);
+update t1 set a= '2012-12-12';
+update v set a= '2000-01-01' order by b limit 1; # point of failure
+drop view v;
+drop table t1, t2;
+--enable_warnings
+
source suite/versioning/common_finish.inc;