Merge laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-allany_aggregate-4.1
This commit is contained in:
commit
9b4018066e
@ -168,7 +168,7 @@ REQ_ID URL
|
||||
1 X
|
||||
5 X,X,X
|
||||
select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll,
|
||||
Max(t1.URL_ID)
urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
Max(t1.URL_ID) urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
REQ_ID URL urll urlg
|
||||
1 X 4 4
|
||||
5 X,X,X 4 5
|
||||
|
@ -709,3 +709,50 @@ Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
|
||||
drop table t1;
|
||||
SET NAMES koi8r;
|
||||
CREATE TABLE t1 (a char(1) character set koi8r);
|
||||
INSERT INTO t1 VALUES (_koi8r'á'),(_koi8r'Á');
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
a  'â'='Â'
|
||||
á Â 1
|
||||
Á Â 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 12
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
set collation_connection=koi8r_bin;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
a  'â'='Â'
|
||||
á Â 0
|
||||
Á Â 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 12
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
set character_set_client=cp1251;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
a ÷ '×'='÷'
|
||||
á ÷ 0
|
||||
Á ÷ 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 12
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 3
|
||||
set character_set_results=cp1251;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
a  'â'='Â'
|
||||
À Â 0
|
||||
à Â 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 12
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 4
|
||||
DROP TABLE t1;
|
||||
|
@ -94,7 +94,7 @@ t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
# check min/max function
|
||||
--replace_result www.help.com X www.host.com X www.google.com X
|
||||
select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll,
|
||||
Max(t1.URL_ID)
urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
Max(t1.URL_ID) urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
@ -487,3 +487,50 @@ select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test character set related variables:
|
||||
# character_set_result
|
||||
# character_set_client
|
||||
# charactet_set_connection/collation_connection
|
||||
# If at least one of the above variables has changed,
|
||||
# the cached query can't be reused. In the below test
|
||||
# absolutely the same query is used several times,
|
||||
# SELECT should fetch different results for every instance.
|
||||
# No hits should be produced.
|
||||
# New cache entry should appear for every SELECT.
|
||||
#
|
||||
SET NAMES koi8r;
|
||||
CREATE TABLE t1 (a char(1) character set koi8r);
|
||||
INSERT INTO t1 VALUES (_koi8r'á'),(_koi8r'Á');
|
||||
#
|
||||
# Run select
|
||||
#
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
#
|
||||
# Change collation_connection and run the same query again
|
||||
#
|
||||
set collation_connection=koi8r_bin;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
#
|
||||
# Now change character_set_client and run the same query again
|
||||
#
|
||||
set character_set_client=cp1251;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
#
|
||||
# And finally change character_set_results and run the same query again
|
||||
#
|
||||
set character_set_results=cp1251;
|
||||
SELECT a,'Â','â'='Â' FROM t1;
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
#
|
||||
# Keep things tidy
|
||||
#
|
||||
DROP TABLE t1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user