summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authormonty@work.mysql.com <>2001-09-02 18:38:33 +0200
committermonty@work.mysql.com <>2001-09-02 18:38:33 +0200
commit447c18954e904e5770d64ae3b0817a16b9060b74 (patch)
tree4689ffbe50e97ce9a47deb58fa2b9e7decdfc6a8 /sql/sql_show.cc
parent102cabfe4acd9c78fe321829bd168342b3fbd68a (diff)
parent759cf54a9e70013d92fe18a84b3e4c56244de7da (diff)
downloadmariadb-git-447c18954e904e5770d64ae3b0817a16b9060b74.tar.gz
merge with 3.23.42
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index ef5fc50b4f7..7806bef7163 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -182,6 +182,8 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
TABLE_LIST table_list;
DBUG_ENTER("mysql_find_files");
+ if (wild && !wild[0])
+ wild=0;
bzero((char*) &table_list,sizeof(table_list));
if (!(dirp = my_dir(path,MYF(MY_WME | (dir ? MY_WANT_STAT : 0)))))
@@ -200,7 +202,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
#endif
{
if (file->name[0] == '.' || !MY_S_ISDIR(file->mystat.st_mode) ||
- (wild && wild[0] && wild_compare(file->name,wild)))
+ (wild && wild_compare(file->name,wild)))
continue;
}
}
@@ -211,8 +213,16 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
is_prefix(file->name,tmp_file_prefix))
continue;
*ext=0;
- if (wild && wild[0] && wild_compare(file->name,wild))
- continue;
+ if (wild)
+ {
+ if (lower_case_table_names)
+ {
+ if (wild_case_compare(file->name,wild))
+ continue;
+ }
+ else if (wild_compare(file->name,wild))
+ continue;
+ }
}
/* Don't show tables where we don't have any privileges */
if (db && !(col_access & TABLE_ACLS))