From ecd3172b00270cc53310e9eb7a009a2a44495a7e Mon Sep 17 00:00:00 2001
From: unknown <rburnett@build.mysql.com>
Date: Fri, 24 Sep 2004 09:00:14 +0200
Subject: [PATCH] Bug #5539  	SHOW DATABASES LIKE and symlinks

sql_show.cc:
  Added wild card check to symdir block in mysql_find_files


sql/sql_show.cc:
  Added wild card check to symdir block in mysql_find_files
---
 sql/sql_show.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6784cd6446..d82af1a624 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -204,7 +204,8 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
 	if (end != buff && end[-1] == FN_LIBCHAR)
 	  end[-1]= 0;				// Remove end FN_LIBCHAR
 	if (!my_stat(buff, &status, MYF(0)) ||
-	    !MY_S_ISDIR(status.st_mode))
+	    !MY_S_ISDIR(status.st_mode) ||
+            (wild && wild_compare(file->name, wild, 0)))
 	  continue;
       }
       else
-- 
2.30.9