Table of Contents
Thanks to the pluggable storage engine architecture of MySQL, upgrading the InnoDB Plugin should be a simple matter of shutting down MySQL, replacing a platform-specific executable file, and restarting the server. If you wish to upgrade and use your existing database, it is essential to perform a “slow” shutdown, or the new plugin may fail when merging buffered inserts or purging deleted records. If your database does not contain any compressed tables, you should be able to use your database with the newest InnoDB Plugin without problems after a slow shutdown.
However, if your database contains compressed tables, it may not be compatible with InnoDB Plugin 1.0.8. Because of an incompatible change introduced in InnoDB Plugin version 1.0.2, some compressed tables may need to be rebuilt, as noted in Section 10.3, “Converting Compressed Tables Created Before Version 1.0.2”. Please follow these steps carefully.
You may, of course, rebuild your database using
mysqldump
or other methods. This may be a
preferable approach if your database is small or there are many
referential constraints among tables.
Note that once you have accessed your database with InnoDB Plugin 1.0.8, you should not try to use it with the Plugin prior to 1.0.2.
Before shutting down the MySQL server containing the InnoDB Plugin, you must enable “slow” shutdown:
SET GLOBAL innodb_fast_shutdown=0;
For the details of the shutdown procedure, see the MySQL manual on The Shutdown Process.
In the directory where the MySQL server looks for plugins,
rename the executable file of the old InnoDB Plugin
(ha_innodb_plugin.so
or
ha_innodb_plugin.dll
), so that you can restore
it later if needed. You may remove the file later. The plugin
directory is specified by the system variable
plugin_dir
. The default location is usually the
lib/plugin
subdirectory of the directory
specified by basedir
.
Download a suitable package for your server platform, operating
system and MySQL version. Extract the contents of the archive
using tar
or a similar tool for Linux and Unix,
or Windows Explorer or WinZip or similar utility for Windows. Copy
the file ha_innodb_plugin.so
or
ha_innodb_plugin.dll
to the directory where the
MySQL server looks for plugins.
Start the MySQL server. Follow the procedure in Section 10.3, “Converting Compressed Tables Created Before Version 1.0.2” to convert any compressed tables if needed.
As with a dynamically installed InnoDB Plugin, you must perform
a “slow” shutdown of the MySQL server. If you have
built MySQL from source code and replaced the built-in InnoDB in MySQL with the
InnoDB Plugin in the source tree as discussed in
Section 9.4, “Building the InnoDB Plugin from Source Code”, you will have
a special version of the mysqld
executable that
contains the InnoDB Plugin.
If you intend to upgrade to a dynamically linked InnoDB Plugin, you can follow the advice of Section 11.3.4, “Uninstalling a Statically Built InnoDB Plugin” and Section 9.3, “Installing the Precompiled InnoDB Plugin as a Shared Library”.
If you intend to upgrade a statically built InnoDB Plugin to
another statically built plugin, you will have to rebuild the
mysqld
executable, shut down the server, and
replace the mysqld
executable before starting
the server.
Either way, please be sure to follow the instructions of Section 10.3, “Converting Compressed Tables Created Before Version 1.0.2” if any compressed tables were created.
The InnoDB Plugin version 1.0.2 introduces an
incompatible change to the format of
compressed tables. This means that some compressed
tables that were created with an earlier version of the
InnoDB Plugin may need to be rebuilt with a bigger
KEY_BLOCK_SIZE
before they can be used.
If you must keep your existing database when you upgrade to InnoDB Plugin 1.0.2 or newer, you will need to perform a “slow” shutdown of MySQL running the previous version of the InnoDB Plugin. Following such a shutdown, and using the newer release of the InnoDB Plugin, you will need to determine which compressed tables need conversion and then follow a procedure to upgrade these tables. Because most users will not have tables where this process is required, this manual does not detail the procedures required. If you have created compressed tables with the InnoDB Plugin prior to release 1.0.2, you may want to review the relevant information on the InnoDB website.