summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 37cbeb81e1d..cce4b440be0 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -375,22 +375,24 @@ static int comp_names(struct fileinfo *a, struct fileinfo *b)
}
-static int
-find_file(const char *name, const char *root, uint flags, char *result, size_t len, ...)
+static int find_file(const char *name, const char *root,
+ uint flags, char *result, size_t len, ...)
{
- int ret;
+ int ret= 1;
va_list va;
- FILEINFO key= { (char*)name, NULL };
const char *subdir;
char *cp;
-
+ FILEINFO key;
+
+ /* Init key with name of the file to look for */
+ key.name= (char*)name;
+
DBUG_ASSERT(root != NULL);
cp= strmake(result, root, len);
if (cp[-1] != FN_LIBCHAR)
*cp++= FN_LIBCHAR;
- ret= 1;
va_start(va, len);
subdir= (!(flags & MY_SEARCH_SELF)) ? va_arg(va, char *) : "";
while (subdir)
@@ -597,7 +599,7 @@ fix_priv_tables:
if (find_file(MYSQL_FIX_PRIV_TABLES_NAME, basedir, MYF(0),
path, sizeof(path),
- "support_files", "share/mysql", "scripts",
+ "support_files", "share", "share/mysql", "scripts",
NullS)
&& find_file(MYSQL_FIX_PRIV_TABLES_NAME, "/usr/local/mysql", MYF(0),
path, sizeof(path),