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

innobase_init(): Remove some dead code

Remove the local variable srv_buf_pool_size_org, which was always 0.
In MySQL 5.7, InnoDB was made a mandatory storage engine, which would
force InnoDB to start up when executing
	mysqld --verbose --help
which is what mysql-test-run.pl is doing as a first step. With a
large innodb_buffer_pool_size, this would take a long time.
So, MySQL 5.7 includes a hack that starts up InnoDB with a smaller
buffer pool when the option --verbose is present.
parent 6e04af1b
......@@ -3705,7 +3705,6 @@ innobase_init(
char *default_path;
uint format_id;
ulong num_pll_degree;
ulint srv_buf_pool_size_org = 0;
DBUG_ENTER("innobase_init");
handlerton* innobase_hton= (handlerton*) p;
......@@ -4304,31 +4303,9 @@ innobase_init(
mysql_cond_register("innodb", all_innodb_conds, count);
#endif /* HAVE_PSI_INTERFACE */
/* Set buffer pool size to default for fast startup when mysqld is
run with --help --verbose options. */
/* JAN: TODO: MySQL 5.7 has opt_verbose
if (opt_help && opt_verbose
&& srv_buf_pool_size > srv_buf_pool_def_size) {
ib::warn() << "Setting innodb_buf_pool_size to "
<< srv_buf_pool_def_size << " for fast startup, "
<< "when running with --help --verbose options.";
srv_buf_pool_size_org = srv_buf_pool_size;
srv_buf_pool_size = srv_buf_pool_def_size;
}
*/
err = innobase_start_or_create_for_mysql();
if (srv_buf_pool_size_org != 0) {
/* Set the original value back to show in help. */
srv_buf_pool_size_org =
buf_pool_size_align(srv_buf_pool_size_org);
innobase_buffer_pool_size =
static_cast<long long>(srv_buf_pool_size_org);
} else {
innobase_buffer_pool_size =
static_cast<long long>(srv_buf_pool_size);
}
innobase_buffer_pool_size = static_cast<long long>(srv_buf_pool_size);
if (err != DB_SUCCESS) {
innodb_shutdown();
......
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