mirror of
https://github.com/MariaDB/server.git
synced 2026-05-01 20:55:32 +02:00
SHOW DATABASES LIKE ... was not converting to lowercase on comparison as the documentation is suggesting. Fixed it to behave similarly to SHOW TABLES LIKE ... and updated the failing on MacOSX lowercase_table2 test case.
This commit is contained in:
parent
d26c6d62a3
commit
e24abd9091
2 changed files with 15 additions and 3 deletions
|
|
@ -56,6 +56,7 @@ CREATE DATABASE `TEST_$1`;
|
||||||
SHOW DATABASES LIKE "TEST%";
|
SHOW DATABASES LIKE "TEST%";
|
||||||
Database (TEST%)
|
Database (TEST%)
|
||||||
TEST_$1
|
TEST_$1
|
||||||
|
test
|
||||||
DROP DATABASE `test_$1`;
|
DROP DATABASE `test_$1`;
|
||||||
CREATE TABLE T1 (a int) engine=innodb;
|
CREATE TABLE T1 (a int) engine=innodb;
|
||||||
INSERT INTO T1 VALUES (1);
|
INSERT INTO T1 VALUES (1);
|
||||||
|
|
@ -171,6 +172,6 @@ create table myUC (i int);
|
||||||
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
||||||
where TABLE_SCHEMA ='mysqltest_LC2';
|
where TABLE_SCHEMA ='mysqltest_LC2';
|
||||||
TABLE_SCHEMA TABLE_NAME
|
TABLE_SCHEMA TABLE_NAME
|
||||||
mysqltest_LC2 myUC
|
mysqltest_lc2 myUC
|
||||||
use test;
|
use test;
|
||||||
drop database mysqltest_LC2;
|
drop database mysqltest_LC2;
|
||||||
|
|
|
||||||
|
|
@ -521,8 +521,19 @@ find_files(THD *thd, List<LEX_STRING> *files, const char *db,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
file_name_len= filename_to_tablename(file->name, uname, sizeof(uname));
|
file_name_len= filename_to_tablename(file->name, uname, sizeof(uname));
|
||||||
if (wild && wild_compare(uname, wild, 0))
|
if (wild)
|
||||||
continue;
|
{
|
||||||
|
if (lower_case_table_names)
|
||||||
|
{
|
||||||
|
if (my_wildcmp(files_charset_info,
|
||||||
|
uname, uname + file_name_len,
|
||||||
|
wild, wild + wild_length,
|
||||||
|
wild_prefix, wild_one,wild_many))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (wild_compare(uname, wild, 0))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!(file_name=
|
if (!(file_name=
|
||||||
thd->make_lex_string(file_name, uname, file_name_len, TRUE)))
|
thd->make_lex_string(file_name, uname, file_name_len, TRUE)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue