mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
fixed comparation of tables/database names with --lower_case_table_names (BUG#2880)
This commit is contained in:
@@ -42,3 +42,10 @@ select count(bags.a) from t1 as Bags;
|
||||
count(bags.a)
|
||||
0
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
delete p1.*,P2.* from t1 as p1, t2 as p2 where p1.a=P2.a;
|
||||
delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
|
||||
update t1 as p1, t2 as p2 SET p1.a=1,P2.a=1 where p1.a=P2.a;
|
||||
update t1 as P1, t2 as P2 SET P1.a=1,p2.a=1 where P1.a=p2.a;
|
||||
drop table t1,t2;
|
||||
|
||||
24
mysql-test/r/lowercase_table_qcache.result
Normal file
24
mysql-test/r/lowercase_table_qcache.result
Normal file
@@ -0,0 +1,24 @@
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
drop database if exists MySQLtesT;
|
||||
create database MySQLtesT;
|
||||
create table MySQLtesT.t1 (a int);
|
||||
select * from MySQLtesT.t1;
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
drop database mysqltest;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
use MySQL;
|
||||
select * from db;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
use test;
|
||||
select * from MySQL.db;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
set GLOBAL query_cache_size=0;
|
||||
@@ -30,3 +30,14 @@ select count(*) from t1;
|
||||
select count(T1.a) from t1;
|
||||
select count(bags.a) from t1 as Bags;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# multiupdate/delete & --lower-case-table-names
|
||||
#
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
delete p1.*,P2.* from t1 as p1, t2 as p2 where p1.a=P2.a;
|
||||
delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
|
||||
update t1 as p1, t2 as p2 SET p1.a=1,P2.a=1 where p1.a=P2.a;
|
||||
update t1 as P1, t2 as P2 SET P1.a=1,p2.a=1 where P1.a=p2.a;
|
||||
drop table t1,t2;
|
||||
|
||||
1
mysql-test/t/lowercase_table_qcache-master.opt
Normal file
1
mysql-test/t/lowercase_table_qcache-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--lower_case_table_names
|
||||
29
mysql-test/t/lowercase_table_qcache.test
Normal file
29
mysql-test/t/lowercase_table_qcache.test
Normal file
@@ -0,0 +1,29 @@
|
||||
-- source include/have_query_cache.inc
|
||||
#
|
||||
# Test of query cache with --lower-case-table-names
|
||||
#
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists MySQLtesT;
|
||||
--enable_warnings
|
||||
|
||||
create database MySQLtesT;
|
||||
create table MySQLtesT.t1 (a int);
|
||||
select * from MySQLtesT.t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop database mysqltest;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
|
||||
use MySQL;
|
||||
disable_result_log;
|
||||
select * from db;
|
||||
enable_result_log;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
use test;
|
||||
disable_result_log;
|
||||
select * from MySQL.db;
|
||||
enable_result_log;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
|
||||
set GLOBAL query_cache_size=0;
|
||||
Reference in New Issue
Block a user