diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-21 17:33:16 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-21 17:33:16 +0300 |
commit | 4ec032b492de5c392f66c9c1764cbf72442ed3a9 (patch) | |
tree | 0d9d0173f285df28d525fab7fbefd6879174e4a7 /sql/sql_sequence.cc | |
parent | c89366866bca2df46b0592719a1f6b6dabf470cb (diff) | |
parent | b1538f4d60bf30de00417a7c3f948d2de654fcb3 (diff) | |
download | mariadb-git-4ec032b492de5c392f66c9c1764cbf72442ed3a9.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r-- | sql/sql_sequence.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index c0925da59e1..b9d500d463c 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -1,5 +1,6 @@ /* Copyright (c) 2017, MariaDB Corporation, Alibaba Corporation + Copyrgiht (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -483,6 +484,10 @@ int SEQUENCE::read_initial_values(TABLE *table) if (mdl_lock_used) thd->mdl_context.release_lock(mdl_request.ticket); write_unlock(table); + + if (!has_active_transaction && !thd->transaction->stmt.is_empty() && + !thd->in_sub_stmt) + trans_commit_stmt(thd); DBUG_RETURN(HA_ERR_LOCK_WAIT_TIMEOUT); } DBUG_ASSERT(table->reginfo.lock_type == TL_READ); |