summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-21 16:36:47 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-21 16:36:47 +0300
commitb1538f4d60bf30de00417a7c3f948d2de654fcb3 (patch)
tree9690f28c9dbdcb5554c9762c81153f37571aa697 /sql/sql_sequence.cc
parentfc48c8ff4c6cb9aa7a0fd27e724e6e3acd555b0e (diff)
parentb75563cdfd161e373480949ffa498bd4a8087b12 (diff)
downloadmariadb-git-b1538f4d60bf30de00417a7c3f948d2de654fcb3.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r--sql/sql_sequence.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index 91959f85e64..a2bcfd5a4ff 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -485,6 +485,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);