summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-07-28 18:28:44 +0300
committerunknown <bell@sanja.is.com.ua>2003-07-28 18:28:44 +0300
commit37ddcebad2df1bad985a07274f20e1a878dbacbf (patch)
treece6e2213aa08303d0a6f26c6409d8b3a9c19e2e3 /mysql-test
parent329e063774537c14348a46c162afec79fc94d589 (diff)
downloadmariadb-git-37ddcebad2df1bad985a07274f20e1a878dbacbf.tar.gz
tabe & query hashes made case insensitive (BUG#933)
mysql-test/r/query_cache.result: fixed charecter sets new case sensetive test mysql-test/t/query_cache.test: fixed charecter sets new case sensetive test sql/sql_cache.cc: query & table comparision should be case insensitive
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/query_cache.result34
-rw-r--r--mysql-test/t/query_cache.test14
2 files changed, 34 insertions, 14 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 3b3e52d8240..68ddb5a377b 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -374,22 +374,23 @@ drop database mysqltest;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
-create table t1 (a char(1) not null);
-insert into t1 values("á");
+create table t1 (a char(1) not null collate koi8r_general_ci);
+insert into t1 values(_koi8r"á");
+set CHARACTER SET koi8r;
select * from t1;
a
á
set CHARACTER SET cp1251_koi8;
select * from t1;
a
set CHARACTER SET DEFAULT;
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 1
+Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 5
+Qcache_hits 4
drop table t1;
create database if not exists mysqltest;
create table mysqltest.t1 (i int not null);
@@ -415,7 +416,7 @@ Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 7
+Qcache_hits 6
drop database mysqltest;
drop table t1;
create table t1 (i int not null);
@@ -429,7 +430,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 7
+Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@@ -441,7 +442,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 7
+Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -454,7 +455,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 8
+Qcache_hits 7
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -466,7 +467,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 9
+Qcache_hits 8
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -535,7 +536,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 12
+Qcache_hits 11
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -552,7 +553,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 13
+Qcache_hits 12
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -561,6 +562,15 @@ set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit";
Variable_name Value
query_cache_min_res_unit 4096
+create table t1 (a int not null);
+insert into t1 values (1);
+select "aaa" from t1;
+aaa
+aaa
+select "AAA" from t1;
+AAA
+AAA
+drop table t1;
create table t1 (a int);
set GLOBAL query_cache_size=1000;
show global variables like "query_cache_size";
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 929146ba97a..6261260115c 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -260,8 +260,9 @@ show status like "Qcache_queries_in_cache";
#
# Charset convertion (cp1251_koi8 always present)
#
-create table t1 (a char(1) not null);
-insert into t1 values("á");
+create table t1 (a char(1) not null collate koi8r_general_ci);
+insert into t1 values(_koi8r"á");
+set CHARACTER SET koi8r;
select * from t1;
set CHARACTER SET cp1251_koi8;
select * from t1;
@@ -369,6 +370,15 @@ set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit";
#
+# Case sensitive test
+#
+create table t1 (a int not null);
+insert into t1 values (1);
+select "aaa" from t1;
+select "AAA" from t1;
+drop table t1;
+
+#
# Test of query cache resizing
#
create table t1 (a int);