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
7ff1a943
Commit
7ff1a943
authored
Mar 16, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-lower_case-4.1
parents
ac8c1cc4
0af6983e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
86 additions
and
14 deletions
+86
-14
mysql-test/r/lowercase_table.result
mysql-test/r/lowercase_table.result
+7
-0
mysql-test/r/lowercase_table_qcache.result
mysql-test/r/lowercase_table_qcache.result
+24
-0
mysql-test/t/lowercase_table.test
mysql-test/t/lowercase_table.test
+11
-0
mysql-test/t/lowercase_table_qcache-master.opt
mysql-test/t/lowercase_table_qcache-master.opt
+1
-0
mysql-test/t/lowercase_table_qcache.test
mysql-test/t/lowercase_table_qcache.test
+29
-0
sql/sql_cache.cc
sql/sql_cache.cc
+12
-12
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
No files found.
mysql-test/r/lowercase_table.result
View file @
7ff1a943
...
...
@@ -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;
mysql-test/r/lowercase_table_qcache.result
0 → 100644
View file @
7ff1a943
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;
mysql-test/t/lowercase_table.test
View file @
7ff1a943
...
...
@@ -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
;
mysql-test/t/lowercase_table_qcache-master.opt
0 → 100644
View file @
7ff1a943
--lower_case_table_names
mysql-test/t/lowercase_table_qcache.test
0 → 100644
View file @
7ff1a943
--
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
;
\ No newline at end of file
sql/sql_cache.cc
View file @
7ff1a943
...
...
@@ -1228,7 +1228,12 @@ void Query_cache::invalidate(char *db)
do
{
next
=
curr
->
next
;
if
(
strcmp
(
db
,
(
char
*
)(
curr
->
table
()
->
db
()))
==
0
)
/*
table_alias_charset used here because it depends of
lower_case_table_names variable
*/
if
(
my_strcasecmp
(
table_alias_charset
,
db
,
(
char
*
)(
curr
->
table
()
->
db
()))
==
0
)
invalidate_table
(
curr
);
/*
invalidate_table can freed block on which point 'next' (if
...
...
@@ -2562,20 +2567,15 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
tables_used
->
db
,
tables_used
->
table
->
db_type
));
*
tables_type
|=
tables_used
->
table
->
file
->
table_cache_type
();
/*
table_alias_charset used here because it depends of
lower_case_table_names variable
*/
if
(
tables_used
->
table
->
db_type
==
DB_TYPE_MRG_ISAM
||
tables_used
->
table
->
tmp_table
!=
NO_TMP_TABLE
||
(
tables_used
->
db_length
==
5
&&
#ifdef FN_NO_CASE_SENCE
my_strnncoll
(
system_charset_info
,
(
uchar
*
)
tables_used
->
db
,
6
,
(
uchar
*
)
"mysql"
,
6
)
==
0
#else
tables_used
->
db
[
0
]
==
'm'
&&
tables_used
->
db
[
1
]
==
'y'
&&
tables_used
->
db
[
2
]
==
's'
&&
tables_used
->
db
[
3
]
==
'q'
&&
tables_used
->
db
[
4
]
==
'l'
#endif
))
my_strnncoll
(
table_alias_charset
,
(
uchar
*
)
tables_used
->
db
,
6
,
(
uchar
*
)
"mysql"
,
6
)
==
0
))
{
DBUG_PRINT
(
"qcache"
,
(
"select not cacheable: used MRG_ISAM, temporary or system table(s)"
));
...
...
sql/sql_parse.cc
View file @
7ff1a943
...
...
@@ -2703,8 +2703,8 @@ mysql_execute_command(THD *thd)
TABLE_LIST
*
walk
;
for
(
walk
=
(
TABLE_LIST
*
)
tables
;
walk
;
walk
=
walk
->
next
)
{
if
(
!
strcmp
(
auxi
->
real_name
,
walk
->
alias
)
&&
!
strcmp
(
walk
->
db
,
auxi
->
db
))
if
(
!
my_strcasecmp
(
table_alias_charset
,
auxi
->
alias
,
walk
->
alias
)
&&
!
my_strcasecmp
(
table_alias_charset
,
walk
->
db
,
auxi
->
db
))
break
;
}
if
(
!
walk
)
...
...
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