mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -846,4 +846,9 @@ SELECT * FROM test.t1;
|
|||||||
a
|
a
|
||||||
USE test;
|
USE test;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
set character_set_results=null;
|
||||||
|
select @@character_set_results;
|
||||||
|
@@character_set_results
|
||||||
|
NULL
|
||||||
|
set character_set_results=default;
|
||||||
SET GLOBAL query_cache_size=0;
|
SET GLOBAL query_cache_size=0;
|
||||||
|
@@ -620,5 +620,11 @@ SELECT * FROM test.t1;
|
|||||||
USE test;
|
USE test;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# charset with NULL
|
||||||
|
#
|
||||||
|
set character_set_results=null;
|
||||||
|
select @@character_set_results;
|
||||||
|
set character_set_results=default;
|
||||||
|
|
||||||
SET GLOBAL query_cache_size=0;
|
SET GLOBAL query_cache_size=0;
|
||||||
|
@@ -780,7 +780,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
|||||||
flags.character_set_client_num=
|
flags.character_set_client_num=
|
||||||
thd->variables.character_set_client->number;
|
thd->variables.character_set_client->number;
|
||||||
flags.character_set_results_num=
|
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=
|
flags.collation_connection_num=
|
||||||
thd->variables.collation_connection->number;
|
thd->variables.collation_connection->number;
|
||||||
flags.limit= thd->variables.select_limit;
|
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);
|
1 : 0);
|
||||||
flags.character_set_client_num= thd->variables.character_set_client->number;
|
flags.character_set_client_num= thd->variables.character_set_client->number;
|
||||||
flags.character_set_results_num=
|
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.collation_connection_num= thd->variables.collation_connection->number;
|
||||||
flags.limit= thd->variables.select_limit;
|
flags.limit= thd->variables.select_limit;
|
||||||
memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
|
memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
|
||||||
|
Reference in New Issue
Block a user