summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-01-15 08:28:10 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-01-15 08:28:10 -0200
commite48c7178f7fb1a64558027e1574e3008368030c6 (patch)
tree13477e1822c17bda5ef63ff3207a8246f83eafd2 /sql/sql_cache.cc
parent91e5423c642c23ba393f005c844c6ee37093e1a8 (diff)
parent852d1d66f6c75535bbe2d74da83dc2d8d7a23f33 (diff)
downloadmariadb-git-e48c7178f7fb1a64558027e1574e3008368030c6.tar.gz
Merge from 5.0-bugteam
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 2fca739f667..5e098edbd7f 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1001,6 +1001,8 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
flags.result_in_binary_protocol= (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.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT);
flags.pkt_nr= net->pkt_nr;
flags.character_set_client_num=
thd->variables.character_set_client->number;
@@ -1022,7 +1024,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
-def_week_frmt: %lu",
+def_week_frmt: %lu, in_trans: %d, autocommit: %d",
(int)flags.client_long_flag,
(int)flags.client_protocol_41,
(int)flags.result_in_binary_protocol,
@@ -1037,7 +1039,10 @@ def_week_frmt: %lu",
flags.max_sort_length,
flags.group_concat_max_len,
flags.div_precision_increment,
- flags.default_week_format));
+ flags.default_week_format,
+ (int)flags.in_trans,
+ (int)flags.autocommit));
+
/*
Make InnoDB to release the adaptive hash index latch before
acquiring the query cache mutex.
@@ -1269,6 +1274,8 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
flags.result_in_binary_protocol= (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.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;
flags.character_set_results_num=
@@ -1288,7 +1295,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
-def_week_frmt: %lu",
+def_week_frmt: %lu, in_trans: %d, autocommit: %d",
(int)flags.client_long_flag,
(int)flags.client_protocol_41,
(int)flags.result_in_binary_protocol,
@@ -1303,7 +1310,9 @@ def_week_frmt: %lu",
flags.max_sort_length,
flags.group_concat_max_len,
flags.div_precision_increment,
- flags.default_week_format));
+ flags.default_week_format,
+ (int)flags.in_trans,
+ (int)flags.autocommit));
memcpy((uchar *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
(uchar*) &flags, QUERY_CACHE_FLAGS_SIZE);
query_block = (Query_cache_block *) hash_search(&queries, (uchar*) sql,