diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-03 03:06:42 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-03 03:06:42 +0300 |
commit | 056ac55aa0954b3321aa5e838a5563e731c1c516 (patch) | |
tree | 8555c47c0ce18227ce535252d2c2966af26183d3 /sql/transaction.cc | |
parent | a6daa9ada052b7b7b09683ea6d565c92f5e15512 (diff) | |
parent | 3701208a2e890d42aabc678a2a5d4ea539941b36 (diff) | |
download | mariadb-git-056ac55aa0954b3321aa5e838a5563e731c1c516.tar.gz |
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/transaction.cc')
-rw-r--r-- | sql/transaction.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/transaction.cc b/sql/transaction.cc index 7b34826d154..8d9b4943404 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -105,7 +105,7 @@ bool trans_begin(THD *thd, uint flags) */ thd->mdl_context.release_transactional_locks(); - thd->options|= OPTION_BEGIN; + thd->variables.option_bits|= OPTION_BEGIN; thd->server_status|= SERVER_STATUS_IN_TRANS; if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) @@ -142,7 +142,7 @@ bool trans_commit(THD *thd) RUN_HOOK(transaction, after_rollback, (thd, FALSE)); else RUN_HOOK(transaction, after_commit, (thd, FALSE)); - thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; @@ -169,16 +169,17 @@ bool trans_commit_implicit(THD *thd) if (trans_check(thd)) DBUG_RETURN(TRUE); - if (thd->in_multi_stmt_transaction() || (thd->options & OPTION_TABLE_LOCK)) + if (thd->in_multi_stmt_transaction() || + (thd->variables.option_bits & OPTION_TABLE_LOCK)) { /* Safety if one did "drop table" on locked tables */ if (!thd->locked_tables_mode) - thd->options&= ~OPTION_TABLE_LOCK; + thd->variables.option_bits&= ~OPTION_TABLE_LOCK; thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= test(ha_commit_trans(thd, TRUE)); } - thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; DBUG_RETURN(res); @@ -205,7 +206,7 @@ bool trans_rollback(THD *thd) thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= ha_rollback_trans(thd, TRUE); RUN_HOOK(transaction, after_rollback, (thd, FALSE)); - thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; @@ -383,7 +384,7 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name) if (ha_rollback_to_savepoint(thd, sv)) res= TRUE; - else if (((thd->options & OPTION_KEEP_LOG) || + else if (((thd->variables.option_bits & OPTION_KEEP_LOG) || thd->transaction.all.modified_non_trans_table) && !thd->slave_thread) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, @@ -605,7 +606,7 @@ bool trans_xa_commit(THD *thd) DBUG_RETURN(TRUE); } - thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; thd->server_status&= ~SERVER_STATUS_IN_TRANS; xid_cache_delete(&thd->transaction.xid_state); @@ -660,7 +661,7 @@ bool trans_xa_rollback(THD *thd) if ((res= test(ha_rollback_trans(thd, TRUE)))) my_error(ER_XAER_RMERR, MYF(0)); - thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; thd->server_status&= ~SERVER_STATUS_IN_TRANS; xid_cache_delete(&thd->transaction.xid_state); |