From 66778143cc81f918164466a34b647b953191323b Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Wed, 23 Mar 2016 17:22:38 +0300 Subject: [PATCH] Bug #80783: Use default buffer pool size for faster startup with --initialize For performance reasons, use the default buffer pool size rather than the one specified in configuration when the server is started with either --initialize or --initialize-insecure options. --- storage/innobase/handler/ha_innodb.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7663f63..4864df4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3950,10 +3950,11 @@ 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. */ + /* Set buffer pool size to default for fast startup when mysqld is run + with --help --verbose options or with --initialize/--initialize-insecure + options. */ ulint srv_buf_pool_size_org = 0; - if (opt_help && opt_verbose + if (((opt_help && opt_verbose) || opt_initialize) && 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, "