Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c5c4e315
Commit
c5c4e315
authored
Oct 08, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into bar.mysql.r18.ru:/usr/home/bar/mysql-4.1
parents
7a623964
9023009a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
0 deletions
+94
-0
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+47
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+47
-0
No files found.
mysql-test/r/query_cache.result
View file @
c5c4e315
...
...
@@ -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;
mysql-test/t/query_cache.test
View file @
c5c4e315
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment