summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc41
1 files changed, 23 insertions, 18 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index bef3318f974..164b8b0cbb0 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1415,6 +1415,8 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG);
flags.client_protocol_41= MY_TEST(thd->client_capabilities &
CLIENT_PROTOCOL_41);
+ flags.client_extended_metadata= MY_TEST(thd->client_capabilities &
+ MARIADB_CLIENT_EXTENDED_METADATA);
flags.client_depr_eof= MY_TEST(thd->client_capabilities &
CLIENT_DEPRECATE_EOF);
/*
@@ -1447,12 +1449,13 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
flags.div_precision_increment= thd->variables.div_precincrement;
flags.default_week_format= thd->variables.default_week_format;
DBUG_PRINT("qcache", ("\
-long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
+long %d, 4.1: %d, ex metadata: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
CS client: %u, CS result: %u, CS conn: %u, limit: %llu, TZ: %p, \
sql mode: 0x%llx, sort len: %llu, concat len: %u, div_precision: %zu, \
def_week_frmt: %zu, in_trans: %d, autocommit: %d",
(int)flags.client_long_flag,
(int)flags.client_protocol_41,
+ (int)flags.client_extended_metadata,
(int)flags.client_depr_eof,
(int)flags.protocol_type,
(int)flags.more_results_exists,
@@ -1924,6 +1927,8 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG);
flags.client_protocol_41= MY_TEST(thd->client_capabilities &
CLIENT_PROTOCOL_41);
+ flags.client_extended_metadata= MY_TEST(thd->client_capabilities &
+ MARIADB_CLIENT_EXTENDED_METADATA);
flags.client_depr_eof= MY_TEST(thd->client_capabilities &
CLIENT_DEPRECATE_EOF);
flags.protocol_type= (unsigned int) thd->protocol->type();
@@ -1947,12 +1952,13 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
flags.default_week_format= thd->variables.default_week_format;
flags.lc_time_names= thd->variables.lc_time_names;
DBUG_PRINT("qcache", ("\
-long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
+long %d, 4.1: %d, ex metadata: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
CS client: %u, CS result: %u, CS conn: %u, limit: %llu, TZ: %p, \
sql mode: 0x%llx, sort len: %llu, concat len: %u, div_precision: %zu, \
def_week_frmt: %zu, in_trans: %d, autocommit: %d",
(int)flags.client_long_flag,
(int)flags.client_protocol_41,
+ (int)flags.client_extended_metadata,
(int)flags.client_depr_eof,
(int)flags.protocol_type,
(int)flags.more_results_exists,
@@ -2727,8 +2733,8 @@ size_t Query_cache::init_cache()
DUMP(this);
- (void) my_hash_init(&queries, &my_charset_bin, def_query_hash_size, 0, 0,
- query_cache_query_get_key, 0, 0);
+ (void) my_hash_init(key_memory_Query_cache, &queries, &my_charset_bin,
+ def_query_hash_size, 0,0, query_cache_query_get_key,0,0);
#ifndef FN_NO_CASE_SENSE
/*
If lower_case_table_names!=0 then db and table names are already
@@ -2738,8 +2744,8 @@ size_t Query_cache::init_cache()
lower_case_table_names == 0 then we should distinguish my_table
and MY_TABLE cases and so again can use binary collation.
*/
- (void) my_hash_init(&tables, &my_charset_bin, def_table_hash_size, 0, 0,
- query_cache_table_get_key, 0, 0);
+ (void) my_hash_init(key_memory_Query_cache, &tables, &my_charset_bin,
+ def_table_hash_size, 0,0, query_cache_table_get_key, 0,0);
#else
/*
On windows, OS/2, MacOS X with HFS+ or any other case insensitive
@@ -2749,11 +2755,9 @@ size_t Query_cache::init_cache()
file system) and so should use case insensitive collation for
comparison.
*/
- (void) my_hash_init(&tables,
- lower_case_table_names ? &my_charset_bin :
- files_charset_info,
- def_table_hash_size, 0, 0,query_cache_table_get_key,
- 0, 0);
+ (void) my_hash_init(PSI_INSTRUMENT_ME, &tables, lower_case_table_names ?
+ &my_charset_bin : files_charset_info,
+ def_table_hash_size, 0,0, query_cache_table_get_key, 0,0);
#endif
queries_in_cache = 0;
@@ -3505,7 +3509,8 @@ my_bool Query_cache::register_all_tables(THD *thd,
my_bool
Query_cache::insert_table(THD *thd, size_t key_len, const char *key,
- Query_cache_block_table *node, size_t db_length, uint8 suffix_length_arg,
+ Query_cache_block_table *node, size_t db_length,
+ uint8 suffix_length_arg,
uint8 cache_type,
qc_engine_callback callback,
ulonglong engine_data,
@@ -5129,7 +5134,7 @@ my_bool Query_cache::in_blocks(Query_cache_block * point)
if (block->pprev->pnext != block)
{
DBUG_PRINT("error",
- ("block %p in physical list is incorrect linked, prev block %p refered as next to %p (check from %p)",
+ ("block %p in physical list is incorrect linked, prev block %p referred as next to %p (check from %p)",
block, block->pprev,
block->pprev->pnext,
point));
@@ -5157,7 +5162,7 @@ err1:
if (block->pnext->pprev != block)
{
DBUG_PRINT("error",
- ("block %p in physicel list is incorrect linked, next block %p refered as prev to %p (check from %p)",
+ ("block %p in physicel list is incorrect linked, next block %p referred as prev to %p (check from %p)",
block, block->pnext,
block->pnext->pprev,
point));
@@ -5186,7 +5191,7 @@ my_bool Query_cache::in_list(Query_cache_block * root,
if (block->prev->next != block)
{
DBUG_PRINT("error",
- ("block %p in list '%s' %p is incorrect linked, prev block %p refered as next to %p (check from %p)",
+ ("block %p in list '%s' %p is incorrect linked, prev block %p referred as next to %p (check from %p)",
block, name, root, block->prev,
block->prev->next,
point));
@@ -5215,7 +5220,7 @@ err1:
if (block->next->prev != block)
{
DBUG_PRINT("error",
- ("block %p in list '%s' %p is incorrect linked, next block %p refered as prev to %p (check from %p)",
+ ("block %p in list '%s' %p is incorrect linked, next block %p referred as prev to %p (check from %p)",
block, name, root, block->next,
block->next->prev,
point));
@@ -5257,7 +5262,7 @@ my_bool Query_cache::in_table_list(Query_cache_block_table * root,
if (table->prev->next != table)
{
DBUG_PRINT("error",
- ("table %p(%p) in list '%s' %p(%p) is incorrect linked, prev table %p(%p) refered as next to %p(%p) (check from %p(%p))",
+ ("table %p(%p) in list '%s' %p(%p) is incorrect linked, prev table %p(%p) referred as next to %p(%p) (check from %p(%p))",
table, table->block(), name,
root, root->block(),
table->prev, table->prev->block(),
@@ -5292,7 +5297,7 @@ err1:
if (table->next->prev != table)
{
DBUG_PRINT("error",
- ("table %p(%p) in list '%s' %p(%p) is incorrect linked, next table %p(%p) refered as prev to %p(%p) (check from %p(%p))",
+ ("table %p(%p) in list '%s' %p(%p) is incorrect linked, next table %p(%p) referred as prev to %p(%p) (check from %p(%p))",
table, table->block(),
name, root, root->block(),
table->next, table->next->block(),