diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-05-06 02:02:08 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-05-06 02:02:08 +0400 |
commit | 9e62cf67b3cf0b92e4f57d49149000d640963bed (patch) | |
tree | e68e344b9f436b051706e830672ac8fbaa869662 /sql/ha_ndbcluster.cc | |
parent | b47e4fbf834b260924d0eb15067f318f00dfbecd (diff) | |
download | mariadb-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/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 38324f3cf19..2d082cc71f6 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -4628,7 +4628,7 @@ int ha_ndbcluster::start_statement(THD *thd, trans_register_ha(thd, FALSE, ndbcluster_hton); if (!thd_ndb->trans) { - if (thd->in_multi_stmt_transaction()) + if (thd->in_multi_stmt_transaction_mode()) trans_register_ha(thd, TRUE, ndbcluster_hton); DBUG_PRINT("trans",("Starting transaction")); thd_ndb->trans= ndb->startTransaction(); @@ -4698,7 +4698,7 @@ int ha_ndbcluster::init_handler_for_statement(THD *thd, Thd_ndb *thd_ndb) } #endif - if (thd->in_multi_stmt_transaction()) + if (thd->in_multi_stmt_transaction_mode()) { const void *key= m_table; HASH_SEARCH_STATE state; @@ -4782,7 +4782,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) if (opt_ndb_cache_check_time && m_rows_changed) { DBUG_PRINT("info", ("Rows has changed and util thread is running")); - if (thd->in_multi_stmt_transaction()) + if (thd->in_multi_stmt_transaction_mode()) { DBUG_PRINT("info", ("Add share to list of tables to be invalidated")); /* NOTE push_back allocates memory using transactions mem_root! */ @@ -4801,7 +4801,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) DBUG_PRINT("trans", ("Last external_lock")); PRINT_OPTION_FLAGS(thd); - if (!thd->in_multi_stmt_transaction()) + if (!thd->in_multi_stmt_transaction_mode()) { if (thd_ndb->trans) { @@ -4911,7 +4911,7 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all) PRINT_OPTION_FLAGS(thd); DBUG_PRINT("enter", ("Commit %s", (all ? "all" : "stmt"))); thd_ndb->start_stmt_count= 0; - if (trans == NULL || (!all && thd->in_multi_stmt_transaction())) + if (trans == NULL || (!all && thd->in_multi_stmt_transaction_mode())) { /* An odditity in the handler interface is that commit on handlerton @@ -4981,7 +4981,7 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all) DBUG_ASSERT(ndb); thd_ndb->start_stmt_count= 0; if (trans == NULL || (!all && - thd->in_multi_stmt_transaction())) + thd->in_multi_stmt_transaction_mode())) { /* Ignore end-of-statement until real rollback or commit is called */ DBUG_PRINT("info", ("Rollback before start or end-of-statement only")); @@ -8271,7 +8271,7 @@ ndbcluster_cache_retrieval_allowed(THD *thd, DBUG_ENTER("ndbcluster_cache_retrieval_allowed"); DBUG_PRINT("enter", ("dbname: %s, tabname: %s", dbname, tabname)); - if (thd->in_multi_stmt_transaction()) + if (thd->in_multi_stmt_transaction_mode()) { DBUG_PRINT("exit", ("No, don't use cache in transaction")); DBUG_RETURN(FALSE); @@ -8339,7 +8339,7 @@ ha_ndbcluster::register_query_cache_table(THD *thd, DBUG_ENTER("ha_ndbcluster::register_query_cache_table"); DBUG_PRINT("enter",("dbname: %s, tabname: %s", m_dbname, m_tabname)); - if (thd->in_multi_stmt_transaction()) + if (thd->in_multi_stmt_transaction_mode()) { DBUG_PRINT("exit", ("Can't register table during transaction")); DBUG_RETURN(FALSE); |