Commit cb364a78 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-31619 dict_stats_persistent_storage_check() may show garbage during --bootstrap

dict_stats_persistent_storage_check(): Do not output errmsg
if opt_bootstrap holds, because the message buffer would likely
be uninitialized.
parent f7b8a2c9
...@@ -514,15 +514,17 @@ static bool dict_stats_persistent_storage_check(bool dict_already_locked) ...@@ -514,15 +514,17 @@ static bool dict_stats_persistent_storage_check(bool dict_already_locked)
dict_sys.unlock(); dict_sys.unlock();
} }
if (ret != DB_SUCCESS && ret != DB_STATS_DO_NOT_EXIST) { switch (ret) {
ib::error() << errstr; case DB_SUCCESS:
return(false); return true;
} else if (ret == DB_STATS_DO_NOT_EXIST) { default:
if (!opt_bootstrap) {
ib::error() << errstr;
}
/* fall through */
case DB_STATS_DO_NOT_EXIST:
return false; return false;
} }
/* else */
return(true);
} }
/** Executes a given SQL statement using the InnoDB internal SQL parser. /** Executes a given SQL statement using the InnoDB internal SQL parser.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment