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/sql_cache.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/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 1e4161dfa1c..92d54c8e71b 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1177,7 +1177,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) DBUG_ASSERT(flags.protocol_type != (unsigned int) Protocol::PROTOCOL_LOCAL); flags.more_results_exists= test(thd->server_status & SERVER_MORE_RESULTS_EXISTS); - flags.in_trans= test(thd->server_status & SERVER_STATUS_IN_TRANS); + flags.in_trans= thd->in_active_multi_stmt_transaction(); flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= net->pkt_nr; flags.character_set_client_num= @@ -1470,7 +1470,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) flags.protocol_type= (unsigned int) thd->protocol->type(); flags.more_results_exists= test(thd->server_status & SERVER_MORE_RESULTS_EXISTS); - flags.in_trans= test(thd->server_status & SERVER_STATUS_IN_TRANS); + flags.in_trans= thd->in_active_multi_stmt_transaction(); flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= thd->net.pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; @@ -1541,7 +1541,7 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", } DBUG_PRINT("qcache", ("Query have result 0x%lx", (ulong) query)); - if (thd->in_multi_stmt_transaction() && + if (thd->in_multi_stmt_transaction_mode() && (query->tables_type() & HA_CACHE_TBL_TRANSACT)) { DBUG_PRINT("qcache", @@ -1698,7 +1698,7 @@ void Query_cache::invalidate(THD *thd, TABLE_LIST *tables_used, if (is_disabled()) DBUG_VOID_RETURN; - using_transactions= using_transactions && thd->in_multi_stmt_transaction(); + using_transactions= using_transactions && thd->in_multi_stmt_transaction_mode(); for (; tables_used; tables_used= tables_used->next_local) { DBUG_ASSERT(!using_transactions || tables_used->table!=0); @@ -1782,7 +1782,7 @@ void Query_cache::invalidate(THD *thd, TABLE *table, if (is_disabled()) DBUG_VOID_RETURN; - using_transactions= using_transactions && thd->in_multi_stmt_transaction(); + using_transactions= using_transactions && thd->in_multi_stmt_transaction_mode(); if (using_transactions && (table->file->table_cache_type() == HA_CACHE_TBL_TRANSACT)) thd->add_changed_table(table); @@ -1800,7 +1800,7 @@ void Query_cache::invalidate(THD *thd, const char *key, uint32 key_length, if (is_disabled()) DBUG_VOID_RETURN; - using_transactions= using_transactions && thd->in_multi_stmt_transaction(); + using_transactions= using_transactions && thd->in_multi_stmt_transaction_mode(); if (using_transactions) // used for innodb => has_transactions() is TRUE thd->add_changed_table(key, key_length); else @@ -3572,7 +3572,7 @@ Query_cache::is_cacheable(THD *thd, size_t query_len, const char *query, tables_type))) DBUG_RETURN(0); - if (thd->in_multi_stmt_transaction() && + if (thd->in_multi_stmt_transaction_mode() && ((*tables_type)&HA_CACHE_TBL_TRANSACT)) { DBUG_PRINT("qcache", ("not in autocommin mode")); |