diff options
author | Chad MILLER <chad@mysql.com> | 2008-08-06 09:25:03 -0400 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-08-06 09:25:03 -0400 |
commit | ff577e3590030de1597a37d0526a32fd32825f4b (patch) | |
tree | 191f411573b11678d1ea9329b81bbe41fa24a033 /netware/mysql_install_db.c | |
parent | 7f615b2c14d3c8d7b7fbd777faa0adeba9a35fdc (diff) | |
download | mariadb-git-ff577e3590030de1597a37d0526a32fd32825f4b.tar.gz |
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.
Diffstat (limited to 'netware/mysql_install_db.c')
-rw-r--r-- | netware/mysql_install_db.c | 20 |
1 files changed, 15 insertions, 5 deletions
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); } |