diff options
author | unknown <bell@sanja.is.com.ua> | 2004-03-30 23:38:56 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-03-30 23:38:56 +0300 |
commit | 963debbe778fb17dc6d99cc33020c63c5f7cb819 (patch) | |
tree | 040a63eb96cf56a15dd16793212073d9f05a9390 /sql/sql_cache.cc | |
parent | 35a21a9c105c3f241d0cd3c64c3242a7fdcc1fa3 (diff) | |
download | mariadb-git-963debbe778fb17dc6d99cc33020c63c5f7cb819.tar.gz |
null processing for character_set_results (BUG#3296)
mysql-test/r/query_cache.result:
test suite for BUG#3296
mysql-test/t/query_cache.test:
test suite for BUG#3296
sql/sql_cache.cc:
null processing for character_set_results
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 4e111df9263..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; @@ -965,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)), |