summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 8f8c84c2db5..4b8e7f8f538 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -463,7 +463,6 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
uint col_access=thd->col_access;
#endif
TABLE_LIST table_list;
- char tbbuff[FN_REFLEN];
DBUG_ENTER("mysql_find_files");
if (wild && !wild[0])
@@ -480,8 +479,6 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
DBUG_RETURN(-1);
}
- VOID(tablename_to_filename(tmp_file_prefix, tbbuff, sizeof(tbbuff)));
-
for (i=0 ; i < (uint) dirp->number_off_files ; i++)
{
char uname[NAME_LEN*3+1]; /* Unencoded name */
@@ -519,7 +516,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
{
// Return only .frm files which aren't temp files.
if (my_strcasecmp(system_charset_info, ext=fn_rext(file->name),reg_ext) ||
- is_prefix(file->name,tbbuff))
+ is_prefix(file->name, tmp_file_prefix))
continue;
*ext=0;
VOID(filename_to_tablename(file->name, uname, sizeof(uname)));
@@ -688,7 +685,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname,
}
else
{
- length= build_table_filename(path, sizeof(path), dbname, "", "");
+ length= build_table_filename(path, sizeof(path), dbname, "", "", 0);
found_libchar= 0;
if (length && path[length-1] == FN_LIBCHAR)
{
@@ -2530,7 +2527,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
}
else
{
- len= build_table_filename(path, sizeof(path), base_name, "", "");
+ len= build_table_filename(path, sizeof(path), base_name, "", "", 0);
end= path + len;
len= FN_LEN - len;
if (mysql_find_files(thd, &files, base_name,
@@ -2684,7 +2681,7 @@ int fill_schema_shemata(THD *thd, TABLE_LIST *tables, COND *cond)
(grant_option && !check_grant_db(thd, file_name)))
#endif
{
- length= build_table_filename(path, sizeof(path), file_name, "", "");
+ length= build_table_filename(path, sizeof(path), file_name, "", "", 0);
found_libchar= 0;
if (length && path[length-1] == FN_LIBCHAR)
{