summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2019-03-24 19:01:54 +1000
committerMarko Mäkelä <marko.makela@mariadb.com>2019-12-29 12:16:04 +0200
commit4923604ee2fba372f28c856a3f41274f7fc6c1c5 (patch)
tree93854e829cafa7ed4af7222f870d401ea49bba59 /mysql-test
parent720e9bd5bed73fdc5b2452a6400431e08ae7eb6f (diff)
downloadmariadb-git-4923604ee2fba372f28c856a3f41274f7fc6c1c5.tar.gz
MDEV-18865 Assertion `t->first->versioned_by_id()' failed in innodb_prepare_commit_versionedbb-10.3-trxid_fixes
Cause: * row_start != 0 treated as it exists. Probably, possible row permutations had not been taken in mind. Solution: * Checking both row_start and row_end is correct, so versioned() function is used
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/versioning/r/trx_id.result9
-rw-r--r--mysql-test/suite/versioning/t/trx_id.test12
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result
index 7c4a540c52a..a140052439c 100644
--- a/mysql-test/suite/versioning/r/trx_id.result
+++ b/mysql-test/suite/versioning/r/trx_id.result
@@ -488,4 +488,13 @@ add column row_end bigint unsigned as row end,
add period for system_time(row_start,row_end),
with system versioning;
set autocommit= 1;
+# MDEV-18865 Assertion `t->first->versioned_by_id()'
+# failed in innodb_prepare_commit_versioned
+create or replace table t (x int) engine=innodb;
+insert into t values (0);
+alter table t add `row_start` bigint unsigned as row start,
+add `row_end` bigint unsigned as row end,
+add period for system_time(`row_start`,`row_end`),
+modify x int after row_start,
+with system versioning;
create or replace database test;
diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test
index 97935ffc975..38724a47fd1 100644
--- a/mysql-test/suite/versioning/t/trx_id.test
+++ b/mysql-test/suite/versioning/t/trx_id.test
@@ -512,4 +512,16 @@ alter table t
with system versioning;
set autocommit= 1;
+--echo # MDEV-18865 Assertion `t->first->versioned_by_id()'
+--echo # failed in innodb_prepare_commit_versioned
+
+create or replace table t (x int) engine=innodb;
+insert into t values (0);
+alter table t add `row_start` bigint unsigned as row start,
+ add `row_end` bigint unsigned as row end,
+ add period for system_time(`row_start`,`row_end`),
+ modify x int after row_start,
+ with system versioning;
+
+
create or replace database test;