diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index e1fc4caf720f3ea3e8c94f83c9f8f7f0b351247d..190bb2383e9525f6c71ba9de87a0d223bf525b54 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -616,6 +616,18 @@ static int run_mysqlcheck_upgrade(void) "--check-upgrade", "--all-databases", "--auto-repair", + NULL); +} + + +static int run_mysqlcheck_fixnames(void) +{ + verbose("Running 'mysqlcheck'..."); + return run_tool(mysqlcheck_path, + NULL, /* Send output from mysqlcheck directly to screen */ + "--no-defaults", + ds_args.str, + "--all-databases", "--fix-db-names", "--fix-table-names", NULL); @@ -784,7 +796,8 @@ int main(int argc, char **argv) /* Run "mysqlcheck" and "mysql_fix_privilege_tables.sql" */ - if (run_mysqlcheck_upgrade() || + if (run_mysqlcheck_fixnames() || + run_mysqlcheck_upgrade() || run_sql_fix_privilege_tables()) { /*