--- client/mysql_upgrade.c +++ client/mysql_upgrade.c @@ -584,6 +584,15 @@ int main(int argc, char **argv) ret= system(cmdline.str); if (ret) { +#if defined(WIFEXITED) && defined(WEXITSTATUS) + /* on unix, system() returns the value returned by wait(), _not_ the exit + * status */ + if (WIFEXITED(ret)) + ret= WEXITSTATUS(ret); + else + /* this could be handled better, but it's a quite unlikely case */ + ret= 1; +#endif fprintf(stderr, "Error executing '%s'\n", cmdline.str); goto error; } @@ -640,7 +649,14 @@ fix_priv_tables: ret= system(cmdline.str); if (ret) + { fprintf(stderr, "Error executing '%s'\n", cmdline.str); + fputs("You can safely ignore all 'Duplicate column' and 'Unknown column' errors\n", + stderr); + fputs("because these just mean that your tables are already up to date.\n", + stderr); + ret= 0; + } error: dynstr_free(&cmdline);