summaryrefslogtreecommitdiffstats
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index a6d497b2..7bac797f 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -1159,6 +1159,8 @@ static int install_used_plugin_data_types(void)
DYNAMIC_STRING ds_result;
const char *query = "SELECT table_comment FROM information_schema.tables"
" WHERE table_comment LIKE 'Unknown data type: %'";
+ if (opt_systables_only)
+ return 0;
if (init_dynamic_string(&ds_result, "", 512, 512))
die("Out of memory");
run_query(query, &ds_result, TRUE);
@@ -1475,7 +1477,12 @@ int main(int argc, char **argv)
open_mysql_upgrade_file();
if (opt_check_upgrade)
- exit(upgrade_already_done(0) == 0);
+ {
+ int upgrade_needed = upgrade_already_done(0);
+ free_used_memory();
+ my_end(my_end_arg);
+ exit(upgrade_needed == 0);
+ }
/* Find mysqlcheck */
find_tool(mysqlcheck_path, IF_WIN("mariadb-check.exe", "mariadb-check"), self_name);