summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-05-04 14:20:14 +0300
committerMonty <monty@mariadb.org>2020-05-23 12:29:10 +0300
commitd1d472646d578608791dcd33c13ca6b2472e31b2 (patch)
treeaf65d684a565414beb5ca0f8fad79aa03adefdd3 /sql/sys_vars.cc
parent7ae812cf2c904b5c070bccd91131f9fc16649bc4 (diff)
downloadmariadb-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/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index df6f9933e36..6fe1bfc732a 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -2999,7 +2999,7 @@ static Sys_var_charptr_fscs Sys_tmpdir(
static bool fix_trans_mem_root(sys_var *self, THD *thd, enum_var_type type)
{
if (type != OPT_GLOBAL)
- reset_root_defaults(&thd->transaction.mem_root,
+ reset_root_defaults(&thd->transaction->mem_root,
thd->variables.trans_alloc_block_size,
thd->variables.trans_prealloc_size);
return false;
@@ -4326,8 +4326,8 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type)
thd->variables.option_bits&=
~(OPTION_BEGIN | OPTION_KEEP_LOG | OPTION_NOT_AUTOCOMMIT |
OPTION_GTID_BEGIN);
- thd->transaction.all.modified_non_trans_table= false;
- thd->transaction.all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
+ thd->transaction->all.modified_non_trans_table= false;
+ thd->transaction->all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
thd->server_status|= SERVER_STATUS_AUTOCOMMIT;
return false;
}
@@ -4336,8 +4336,8 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type)
(OPTION_AUTOCOMMIT |OPTION_NOT_AUTOCOMMIT)) == 0)
{
// disabling autocommit
- thd->transaction.all.modified_non_trans_table= false;
- thd->transaction.all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
+ thd->transaction->all.modified_non_trans_table= false;
+ thd->transaction->all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
thd->server_status&= ~SERVER_STATUS_AUTOCOMMIT;
thd->variables.option_bits|= OPTION_NOT_AUTOCOMMIT;
return false;