summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-11-29 23:36:26 +0300
committerunknown <kostja@bodhi.local>2006-11-29 23:36:26 +0300
commit78ade29ecfd604e6333140d98bb9dbbee9b221ac (patch)
treec8d9d8759362a89e2fc5a7bf0b6f2f7369ef34c7 /client/mysql_upgrade.c
parent6d1e66a3de34b1b7b71c73c550cd1d13f1db9dcd (diff)
parentc41da42c6aa70ad9824a653f5ae39216c2eaaf1f (diff)
downloadmariadb-git-78ade29ecfd604e6333140d98bb9dbbee9b221ac.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge libmysql/libmysql.c: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/udf.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_sum.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index d472af03f39..46862dd1da6 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -373,22 +373,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)