diff options
author | unknown <bell@sanja.is.com.ua> | 2004-03-31 08:24:12 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-03-31 08:24:12 +0300 |
commit | 9c2e4b0360600840efa1ac396aa2f398ee07f4da (patch) | |
tree | c34e61f4dddc2cae03973f7a16b835d8d95f8dcd /sql/sql_cache.cc | |
parent | 4cd406a9294a15c598e19f3134d4033ed7c67a60 (diff) | |
parent | 963debbe778fb17dc6d99cc33020c63c5f7cb819 (diff) | |
download | mariadb-git-9c2e4b0360600840efa1ac396aa2f398ee07f4da.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.1
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 66422a5ed3a..39061a6501b 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -780,7 +780,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= - thd->variables.character_set_results->number; + (thd->variables.character_set_results ? + thd->variables.character_set_results->number : + UINT_MAX); flags.collation_connection_num= thd->variables.collation_connection->number; flags.limit= thd->variables.select_limit; @@ -795,6 +797,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) if (ask_handler_allowance(thd, tables_used)) { + refused++; STRUCT_UNLOCK(&structure_guard_mutex); DBUG_VOID_RETURN; } @@ -964,7 +967,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) 1 : 0); flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= - thd->variables.character_set_results->number; + (thd->variables.character_set_results ? + thd->variables.character_set_results->number : + UINT_MAX); flags.collation_connection_num= thd->variables.collation_connection->number; flags.limit= thd->variables.select_limit; memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), |