1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Nicer output for mysql_upgrade

Added --silent option to mysql_upgrade so that one can only get errors printed
Don't write unnecessary warning about log tables during upgrade



client/mysql_upgrade.c:
  Don't print connect arguments if not using --verbose --verbose
  Added option --silent to only print errors. This options is passed to mysqlcheck.
  Write out phase names
  The 'verbose' code is a bit strange as I wanted to keep compatibility with old mysql_upgrade
client/mysqlcheck.c:
  Don't upgrade log tables (to avoid confusing warning message that they can't be locked)
This commit is contained in:
Michael Widenius
2010-09-05 12:39:17 +03:00
parent 688064f87f
commit 74af6dfad0
2 changed files with 36 additions and 8 deletions

View File

@ -526,6 +526,7 @@ static int process_all_tables_in_db(char *database)
MYSQL_RES *res;
MYSQL_ROW row;
uint num_columns;
my_bool system_database;
LINT_INIT(res);
if (use_db(database))
@ -539,6 +540,9 @@ static int process_all_tables_in_db(char *database)
return 1;
}
if (!strcmp(database, "mysql") || !strcmp(database, "MYSQL"))
system_database= 1;
num_columns= mysql_num_fields(res);
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
@ -581,6 +585,10 @@ static int process_all_tables_in_db(char *database)
/* Skip views if we don't perform renaming. */
if ((what_to_do != DO_UPGRADE) && (num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
continue;
if (system_database &&
(!strcmp(row[0], "general_log") ||
!strcmp(row[0], "slow_log")))
continue; /* Skip logging tables */
handle_request_for_tables(row[0], fixed_name_length(row[0]));
}