diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-27 08:44:28 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-27 08:44:28 +0300 |
commit | 29b2f3dbb543130a7ba71635216a8d7d34cac46e (patch) | |
tree | 208e03e23fd11e7a768130ce43ae18c19b6f2df5 /mysql-test | |
parent | 0785771e571c8e32f29143d1e1e77f46918b2ef1 (diff) | |
download | mariadb-git-29b2f3dbb543130a7ba71635216a8d7d34cac46e.tar.gz |
MDEV-24545 Sequence created by one connection remains invisible to anotherst-10.3
row_merge_is_index_usable(): Allow access to any SEQUENCE, even if it was
created after the read view. SQL sequences are no-rollback tables with no
history at all.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/sql_sequence/concurrent_create.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/sql_sequence/concurrent_create.test | 19 |
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/concurrent_create.result b/mysql-test/suite/sql_sequence/concurrent_create.result index 7e68195f7e0..2473abef37d 100644 --- a/mysql-test/suite/sql_sequence/concurrent_create.result +++ b/mysql-test/suite/sql_sequence/concurrent_create.result @@ -31,3 +31,16 @@ connection con1; disconnect con1; connection default; DROP TABLE s1,s2; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connect con1,localhost,root,,test; +CREATE SEQUENCE s1 ENGINE=InnoDB; +FLUSH TABLES; +disconnect con1; +connection default; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +1 +COMMIT; +DROP TABLE t1; +DROP SEQUENCE s1; diff --git a/mysql-test/suite/sql_sequence/concurrent_create.test b/mysql-test/suite/sql_sequence/concurrent_create.test index d6a57ff7d50..b27a6d3bdb9 100644 --- a/mysql-test/suite/sql_sequence/concurrent_create.test +++ b/mysql-test/suite/sql_sequence/concurrent_create.test @@ -56,3 +56,22 @@ FLUSH TABLES; --connection default DROP TABLE s1,s2; + +# +# MDEV-24545 Sequence created by one connection remains invisible to another +# +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +START TRANSACTION WITH CONSISTENT SNAPSHOT; + +--connect (con1,localhost,root,,test) +CREATE SEQUENCE s1 ENGINE=InnoDB; +FLUSH TABLES; +--disconnect con1 + +--connection default +SELECT NEXTVAL(s1); +COMMIT; + +# Cleanup +DROP TABLE t1; +DROP SEQUENCE s1; |