From ff577e3590030de1597a37d0526a32fd32825f4b Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Wed, 6 Aug 2008 09:25:03 -0400 Subject: Bug#30129: mysql_install_db appears to run normally, but the databases \ are not created {Netware} The init and test sql files were not created at cross-compilation time. Now, make them in the default build rule. Additionally, remove the "fix" SQL instructions, which are unnecessary for newly initialized databases. Also, clean up the english in an error message, and BZRify nwbootstrap. --- netware/mysql_install_db.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'netware/mysql_install_db.c') diff --git a/netware/mysql_install_db.c b/netware/mysql_install_db.c index 65ee7873e5c..218c5024a8c 100644 --- a/netware/mysql_install_db.c +++ b/netware/mysql_install_db.c @@ -324,9 +324,10 @@ void create_paths() ******************************************************************************/ int mysql_install_db(int argc, char *argv[]) { - arg_list_t al; - int i, j, err; - char skip; + arg_list_t al; + int i, j, err; + char skip; + struct stat info; // private options static char *private_options[] = @@ -363,6 +364,15 @@ int mysql_install_db(int argc, char *argv[]) add_arg(&al, "--skip-innodb"); add_arg(&al, "--skip-bdb"); + if ((err = stat(sql_file, &info)) != 0) + { + printf("ERROR - %s:\n", strerror(errno)); + printf("\t%s\n\n", sql_file); + // free args + free_args(&al); + exit(-1); + } + // spawn mysqld err = spawn(mysqld, &al, TRUE, sql_file, out_log, err_log); @@ -395,9 +405,9 @@ int main(int argc, char **argv) // install the database if (mysql_install_db(argc, argv)) { - printf("ERROR - The database creation failed!\n"); + printf("ERROR - Failed to create the database!\n"); printf(" %s\n", strerror(errno)); - printf("See the following log for more infomration:\n"); + printf("See the following log for more information:\n"); printf("\t%s\n\n", err_log); exit(-1); } -- cgit v1.2.1