1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

mysqlcheck fix-view-algorithm -> upgrade-views

Change mysqlcheck option to upgrade-views={NO,YES,FROM_MYSQL}

mysql_upgrade now runs upgrade-views=yes to perform a checksum of all
views and add mariadb-version by default. upgrade-views=from_mysql if
MySQL is detected as teh origin version.
This commit is contained in:
Daniel Black
2015-04-14 12:43:50 +10:00
parent 808608cb3f
commit 97e0aeaf72
6 changed files with 65 additions and 30 deletions

View File

@ -784,19 +784,22 @@ static my_bool is_mysql()
static int run_mysqlcheck_views(void)
{
if (!is_mysql())
const char *upgrade_views="--upgrade-views=YES";
if (is_mysql())
{
verbose("Phase %d/%d: Fixing views - skipped - not required", phase++, phases_total);
return 0;
upgrade_views="--upgrade-views=FROM_MYSQL";
verbose("Phase %d/%d: Fixing views from mysql", phase++, phases_total);
}
verbose("Phase %d/%d: Fixing views", phase++, phases_total);
else
verbose("Phase %d/%d: Fixing views", phase++, phases_total);
print_conn_args("mysqlcheck");
return run_tool(mysqlcheck_path,
NULL, /* Send output from mysqlcheck directly to screen */
"--no-defaults",
ds_args.str,
"--all-databases",
"--fix-view-algorithm",
upgrade_views,
"--skip-fix-tables",
opt_verbose ? "--verbose": "",
opt_silent ? "--silent": "",