diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-03-13 18:38:36 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-03-13 18:39:11 +0000 |
commit | a8715884a4ea16b4077477579a72bc3ce61c4f0a (patch) | |
tree | 32b0f2004bcbd40e8b2bfa666aaad349fe6da20d /sql/mysql_install_db.cc | |
parent | bfef611a22a0d21248c6f8e46096bbe84e5daf6f (diff) | |
download | mariadb-git-a8715884a4ea16b4077477579a72bc3ce61c4f0a.tar.gz |
MDEV-11903 Windows : Support innodb page sizes in the installer/mysql_install_db.exe
- add PAGESIZE property to the MSI installer
- add combobox to the MSI UI to select innodb page size
- add new parameter --innodb_page_size for mysql_install_db.exe.
this is passed down to bootstrap and also stored in my.ini.
MSI will call mysql_install_db.exe with --innodb_page_size set to the
PAGESIZE property
Diffstat (limited to 'sql/mysql_install_db.cc')
-rw-r--r-- | sql/mysql_install_db.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index c23a20ebac9..58f19c427aa 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -47,6 +47,7 @@ static char *opt_datadir; static char *opt_service; static char *opt_password; static int opt_port; +static int opt_innodb_page_size; static char *opt_socket; static char *opt_os_user; static char *opt_os_password; @@ -56,6 +57,7 @@ static my_bool opt_skip_networking; static my_bool opt_verbose_bootstrap; static my_bool verbose_errors; +#define DEFAULT_INNODB_PAGE_SIZE 16*1024 static struct my_option my_long_options[]= { @@ -81,6 +83,8 @@ static struct my_option my_long_options[]= {"skip-networking", 'N', "Do not use TCP connections, use pipe instead", &opt_skip_networking, &opt_skip_networking, 0 , GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, + { "innodb-page-size", 'i', "Page size for innodb", + &opt_innodb_page_size, &opt_innodb_page_size, 0, GET_INT, REQUIRED_ARG, DEFAULT_INNODB_PAGE_SIZE, 1*1024, 64*1024, 0, 0, 0 }, {"silent", 's', "Print less information", &opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"verbose-bootstrap", 'o', "Include mysqld bootstrap output",&opt_verbose_bootstrap, @@ -259,13 +263,13 @@ static char *init_bootstrap_command_line(char *cmdline, size_t size) char basedir[MAX_PATH]; get_basedir(basedir, sizeof(basedir), mysqld_path); - my_snprintf(cmdline, size-1, - "\"\"%s\" --no-defaults %s --bootstrap" + my_snprintf(cmdline, size - 1, + "\"\"%s\" --no-defaults %s --innodb-page-size=%d --bootstrap" " \"--lc-messages-dir=%s/share\"" " --basedir=. --datadir=. --default-storage-engine=myisam" " --max_allowed_packet=9M " " --net-buffer-length=16k\"", mysqld_path, - opt_verbose_bootstrap?"--console":"", basedir ); + opt_verbose_bootstrap ? "--console" : "", opt_innodb_page_size, basedir); return cmdline; } @@ -316,7 +320,10 @@ static int create_myini() { fprintf(myini,"port=%d\n", opt_port); } - + if (opt_innodb_page_size != DEFAULT_INNODB_PAGE_SIZE) + { + fprintf(myini, "innodb-page-size=%d\n", opt_innodb_page_size); + } /* Write out client settings. */ fprintf(myini, "[client]\n"); @@ -652,13 +659,6 @@ static int create_db_instance() goto end; } - /* - Remove innodb log files if they exist (this works around "different size logs" - error in MSI installation). TODO : remove this with the next Innodb, where - different size is handled gracefully. - */ - DeleteFile("ib_logfile0"); - DeleteFile("ib_logfile1"); /* Create my.ini file in data directory.*/ ret= create_myini(); |