diff options
author | Chad MILLER <chad@mysql.com> | 2008-08-18 11:08:57 -0400 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-08-18 11:08:57 -0400 |
commit | d5f5db845220cab60d82d0a1667c5dff6774e902 (patch) | |
tree | 9f0d487c241e35ad92c5d81132c46c179b6ee56c /netware/mysql_install_db.c | |
parent | 86fd86ed9839204be5bbae11bc19a3e1a3728332 (diff) | |
parent | 9f277e55549f2581aef45e8d098d2cda366bb2c1 (diff) | |
download | mariadb-git-d5f5db845220cab60d82d0a1667c5dff6774e902.tar.gz |
Merge from 5.0-bugteam local.
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 07e02c35ff3..b6a2c9ec4f6 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[] = @@ -362,6 +363,15 @@ int mysql_install_db(int argc, char *argv[]) add_arg(&al, "--skip-grant-tables"); add_arg(&al, "--skip-innodb"); + 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); @@ -394,9 +404,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); } |