diff options
author | Monty <monty@mariadb.org> | 2020-05-04 14:20:14 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-05-23 12:29:10 +0300 |
commit | d1d472646d578608791dcd33c13ca6b2472e31b2 (patch) | |
tree | af65d684a565414beb5ca0f8fad79aa03adefdd3 /sql/sql_sequence.cc | |
parent | 7ae812cf2c904b5c070bccd91131f9fc16649bc4 (diff) | |
download | mariadb-git-d1d472646d578608791dcd33c13ca6b2472e31b2.tar.gz |
Change THD->transaction to a pointer to enable multiple transactions
All changes (except one) is of type
thd->transaction. -> thd->transaction->
thd->transaction points by default to 'thd->default_transaction'
This allows us to 'easily' have multiple active transactions for a
THD object, like when reading data from the mysql.proc table
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r-- | sql/sql_sequence.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index f41221e11de..45bc519816a 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -437,7 +437,7 @@ int SEQUENCE::read_initial_values(TABLE *table) MYSQL_LOCK *lock; bool mdl_lock_used= 0; THD *thd= table->in_use; - bool has_active_transaction= !thd->transaction.stmt.is_empty(); + bool has_active_transaction= !thd->transaction->stmt.is_empty(); /* There is already a mdl_ticket for this table. However, for list_fields the MDL lock is of type MDL_SHARED_HIGH_PRIO which is not usable @@ -490,7 +490,7 @@ int SEQUENCE::read_initial_values(TABLE *table) But we also don't want to commit the stmt transaction while in a substatement, see MDEV-15977. */ - if (!has_active_transaction && !thd->transaction.stmt.is_empty() && + if (!has_active_transaction && !thd->transaction->stmt.is_empty() && !thd->in_sub_stmt) trans_commit_stmt(thd); } |