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
This commit is contained in:
Vladislav Vaintroub 2017-03-13 18:38:36 +00:00
commit a8715884a4
2 changed files with 37 additions and 64 deletions

View file

@ -12,7 +12,7 @@
<!-- If Innodb is compiled in, enable "optimize for transactions" checkbox -->
<?ifndef HaveInnodb ?>
<?define HaveInnodb="0"?>
<?define HaveInnodb="1"?>
<?endif?>
<Property Id="PortTemplate" Value="#####" />
@ -55,13 +55,14 @@
<!-- Activate feedback plugin-->
<Property Id="FEEDBACK" Secure="yes"/>
<?if $(var.HaveInnodb) = "1" ?>
<!-- Quick configuration : set default storage engine to innodb, use strict sql_mode -->
<Property Id="STDCONFIG" Secure="yes" Value="1"/>
<?endif?>
<!-- Quick configuration : set default storage engine to innodb, use strict sql_mode -->
<Property Id="STDCONFIG" Secure="yes" Value="1"/>
<!-- Innodb Buffer pool size in MB-->
<Property Id="BUFFERPOOLSIZE" Secure="yes"/>
<!-- Innodb page size -->
<Property Id="PAGESIZE" Secure="yes" Value="16K"/>
<CustomAction Id="LaunchUrl" BinaryKey="WixCA" DllEntry="WixShellExec" Execute="immediate" Return="check" Impersonate="yes" />
@ -336,29 +337,25 @@
<Condition Action="disable">Not EnableNetworking</Condition>
</Control>
<?if $(var.HaveInnodb) = "1" ?>
<Control Id="CheckBoxStandardConfig" Type="CheckBox" Height="18" Width="220" X="9" Y="171" Property="STDCONFIG" CheckBoxValue="1">
<Text>{\Font1}Optimize for transactions</Text>
<Control Id="LabelInnodbSettings" Type="Text" Height="18" Width="220" X="25" Y="171" >
<Text>{\Font1}Innodb engine settings</Text>
</Control>
<Control Id="StandardConfigExplain" Type="Text" X="25" Y="190" Width="270" Height="14" TabSkip="yes">
<Text>(Uses transactional storage engine and "strict" SQL mode)</Text>
<Condition Action="enable" >STDCONFIG</Condition>
<Condition Action="disable">Not STDCONFIG</Condition>
<Control Id="LabelInnodbBufferpool" Type="Text" Height="17" Width="77" X="25" Y="190" Text="Buffer pool size:" />
<Control Id="BPSize" Type="MaskedEdit" X="104" Y="188" Width="40" Height="15" Property="BUFFERPOOLSIZE" Sunken="yes" Text="[BufferPoolSizeTemplate]"/>
<Control Id="LabelMB" Type="Text" Height="17" Width="15" X="150" Y="190" Text="MB" />
<Control Id="LabelInnodbPageSize" Type="Text" Height="17" Width="77" X="25" Y="208" Text="Page size:" />
<Control Id="LabelKB" Type="Text" Height="17" Width="15" X="150" Y="210" Text="KB" />
<Control Id="ComboBoxInnodbPageSize" Type="ComboBox" X="104" Y="208" Width="30" Height="17" ComboList="yes" Sorted="yes" Property="PAGESIZE" >
<ComboBox Property="PAGESIZE">
<ListItem Text=" 1" Value="1K"/>
<ListItem Text=" 2" Value="2K"/>
<ListItem Text=" 4" Value="4K"/>
<ListItem Text=" 8" Value="8K"/>
<ListItem Text="16" Value="16K"/>
<ListItem Text="32" Value="32K"/>
<ListItem Text="64" Value="64K"/>
</ComboBox>
</Control>
<Control Id="LabelInnodbBufferpool" Type="Text" Height="17" Width="77" X="25" Y="210" Text="Buffer pool size:" >
<Condition Action="enable" >STDCONFIG</Condition>
<Condition Action="disable">Not STDCONFIG</Condition>
</Control>
<Control Id="BPSize" Type="MaskedEdit" X="104" Y="208" Width="40" Height="15" Property="BUFFERPOOLSIZE" Sunken="yes" Text="[BufferPoolSizeTemplate]">
<Condition Action="enable" >STDCONFIG</Condition>
<Condition Action="disable">Not STDCONFIG</Condition>
</Control>
<Control Id="LabelMB" Type="Text" Height="17" Width="15" X="150" Y="210" Text="MB" >
<Condition Action="enable" >STDCONFIG</Condition>
<Condition Action="disable">Not STDCONFIG</Condition>
</Control>
<?endif?>
<!-- Navigation buttons-->
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
@ -493,26 +490,11 @@
<ServiceControl Id='DBInstanceServiceStop' Name='[SERVICENAME]' Stop='both' Remove='uninstall' Wait='yes'/>
<ServiceControl Id='DBInstanceServiceStart' Name='[SERVICENAME]' Start='install' Wait='yes'/>
</Component>
<?if $(var.HaveInnodb) = "1" ?>
<Component Id="C.myiniconfig" Guid="*" Directory="DATADIR">
<Condition>STDCONFIG</Condition>
<RegistryValue Root='HKLM'
Key='SOFTWARE\Monty Program AB\@CPACK_WIX_PACKAGE_NAME@'
Name='STDCONFIG' Value='1' Type='string' KeyPath='yes'/>
<IniFile Id="Ini1"
Action="createLine"
Directory="DATADIR"
Section="mysqld"
Name="my.ini"
Key="sql_mode"
Value="&quot;STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION&quot;" />
<IniFile Id="Ini2"
Action="createLine"
Directory="DATADIR"
Section="mysqld"
Name="my.ini"
Key="default_storage_engine"
Value="innodb" />
<IniFile Id="Ini3"
Action="createLine"
Directory="DATADIR"
@ -520,16 +502,7 @@
Name="my.ini"
Key="innodb_buffer_pool_size"
Value="[BUFFERPOOLSIZE]M" />
<IniFile Id="Ini4"
Action="createLine"
Directory="DATADIR"
Section="mysqld"
Name="my.ini"
Key="innodb_log_file_size"
Value="[LOGFILESIZE]M" />
</Component>
<?endif?>
<Component Id="C.feedback" Guid="*" Directory="DATADIR">
<Condition>FEEDBACK</Condition>
<RegistryValue Root='HKLM'
@ -699,7 +672,7 @@
<CustomAction Id='PresetDatabaseProperties' BinaryKey='wixca.dll' DllEntry='PresetDatabaseProperties' />
<CustomAction Id="CreateDatabaseCommand" Property="CreateDatabase"
Value=
"&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; --port=[PORT] &quot;--password=[ESCAPEDPASSWORD]&quot; &quot;--datadir=[DATADIR]\&quot; [SKIPNETWORKING] [ALLOWREMOTEROOTACCESS] [DEFAULTUSER] --verbose-bootstrap"
"&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; --port=[PORT] --innodb-page-size=[PAGESIZE] &quot;--password=[ESCAPEDPASSWORD]&quot; &quot;--datadir=[DATADIR]\&quot; [SKIPNETWORKING] [ALLOWREMOTEROOTACCESS] [DEFAULTUSER] --verbose-bootstrap"
Execute="immediate"
HideTarget="yes"
/>