summaryrefslogtreecommitdiff
path: root/sql/transaction.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-05-06 02:02:08 +0400
committerKonstantin Osipov <kostja@sun.com>2010-05-06 02:02:08 +0400
commit9e62cf67b3cf0b92e4f57d49149000d640963bed (patch)
treee68e344b9f436b051706e830672ac8fbaa869662 /sql/transaction.cc
parentb47e4fbf834b260924d0eb15067f318f00dfbecd (diff)
downloadmariadb-git-9e62cf67b3cf0b92e4f57d49149000d640963bed.tar.gz
Clean-up, give better names, add comments to
thd->in_multi_stmt_transaction() and thd->active_transaction(). include/mysql_com.h: Comment SERVER_STATUS_IN_TRANS flag. sql/ha_ndbcluster.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/handler.cc: Add comments. sql/log.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/log_event.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/sql_base.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/sql_cache.cc: Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction(). sql/sql_class.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/sql_class.h: Rename and comment two transaction processing- related methods. sql/sql_parse.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction(). sql/sql_prepare.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). sql/sql_rename.cc: Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction(). sql/sql_table.cc: Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction(). sql/sys_vars.cc: Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction(). sql/transaction.cc: Rename: thd->in_multi_stmt_transaction() -> thd->in_multi_stmt_transaction_mode(). Rename: thd->active_transaction() -> thd->in_active_multi_stmt_transaction().
Diffstat (limited to 'sql/transaction.cc')
-rw-r--r--sql/transaction.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/transaction.cc b/sql/transaction.cc
index ff4eabc2b0f..5047de1ccdc 100644
--- a/sql/transaction.cc
+++ b/sql/transaction.cc
@@ -169,7 +169,7 @@ bool trans_commit_implicit(THD *thd)
if (trans_check(thd))
DBUG_RETURN(TRUE);
- if (thd->in_multi_stmt_transaction() ||
+ if (thd->in_multi_stmt_transaction_mode() ||
(thd->variables.option_bits & OPTION_TABLE_LOCK))
{
/* Safety if one did "drop table" on locked tables */
@@ -305,7 +305,7 @@ bool trans_savepoint(THD *thd, LEX_STRING name)
SAVEPOINT **sv, *newsv;
DBUG_ENTER("trans_savepoint");
- if (!(thd->in_multi_stmt_transaction() || thd->in_sub_stmt) ||
+ if (!(thd->in_multi_stmt_transaction_mode() || thd->in_sub_stmt) ||
!opt_using_transactions)
DBUG_RETURN(FALSE);
@@ -467,7 +467,7 @@ bool trans_xa_start(THD *thd)
my_error(ER_XAER_INVAL, MYF(0));
else if (xa_state != XA_NOTR)
my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
- else if (thd->locked_tables_mode || thd->active_transaction())
+ else if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction())
my_error(ER_XAER_OUTSIDE, MYF(0));
else if (xid_cache_search(thd->lex->xid))
my_error(ER_XAER_DUPID, MYF(0));