mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Clean-up, give better names, add comments to
thd->in_multi_stmt_transaction() and thd->active_transaction().
This commit is contained in:
@ -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"));
|
||||
|
Reference in New Issue
Block a user