Bug#25830 SHOW TABLE STATUS behaves differently depending on table name(for 5.0 only)
replace wild_case_compare with my_wildcmp which is multibyte safe function
This commit is contained in:
parent
209cc33609
commit
7acaece2ba
9
mysql-test/r/lowercase_utf8.result
Normal file
9
mysql-test/r/lowercase_utf8.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
set names utf8;
|
||||||
|
create table `А` (id int);
|
||||||
|
show tables from test like 'А';
|
||||||
|
Tables_in_test (А)
|
||||||
|
а
|
||||||
|
show tables from test like 'а';
|
||||||
|
Tables_in_test (а)
|
||||||
|
а
|
||||||
|
drop table `А`;
|
4
mysql-test/t/lowercase_utf8-master.opt
Normal file
4
mysql-test/t/lowercase_utf8-master.opt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
--lower-case-table-names=1 --character-set-server=utf8
|
||||||
|
|
||||||
|
|
||||||
|
|
9
mysql-test/t/lowercase_utf8.test
Normal file
9
mysql-test/t/lowercase_utf8.test
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Bug#25830 SHOW TABLE STATUS behaves differently depending on table name
|
||||||
|
#
|
||||||
|
set names utf8;
|
||||||
|
create table `А` (id int);
|
||||||
|
show tables from test like 'А';
|
||||||
|
show tables from test like 'а';
|
||||||
|
drop table `А`;
|
||||||
|
|
@ -287,11 +287,18 @@ find_files(THD *thd, List<char> *files, const char *db,
|
|||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
uint col_access=thd->col_access;
|
uint col_access=thd->col_access;
|
||||||
#endif
|
#endif
|
||||||
|
uint wild_length= 0;
|
||||||
TABLE_LIST table_list;
|
TABLE_LIST table_list;
|
||||||
DBUG_ENTER("find_files");
|
DBUG_ENTER("find_files");
|
||||||
|
|
||||||
if (wild && !wild[0])
|
if (wild)
|
||||||
wild=0;
|
{
|
||||||
|
if (!wild[0])
|
||||||
|
wild= 0;
|
||||||
|
else
|
||||||
|
wild_length= strlen(wild);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bzero((char*) &table_list,sizeof(table_list));
|
bzero((char*) &table_list,sizeof(table_list));
|
||||||
|
|
||||||
@ -340,8 +347,11 @@ find_files(THD *thd, List<char> *files, const char *db,
|
|||||||
{
|
{
|
||||||
if (lower_case_table_names)
|
if (lower_case_table_names)
|
||||||
{
|
{
|
||||||
if (wild_case_compare(files_charset_info, file->name, wild))
|
if (my_wildcmp(files_charset_info,
|
||||||
continue;
|
file->name, file->name + strlen(file->name),
|
||||||
|
wild, wild + wild_length,
|
||||||
|
wild_prefix, wild_one,wild_many))
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else if (wild_compare(file->name,wild,0))
|
else if (wild_compare(file->name,wild,0))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user