tags:

views:

10

answers:

1

Is there any way to make MySQL tell you what version of the InnoDB plugin it's running? I know you can look at the documentation, but I'm trying to verify a potential bug if the plugin jives with the mysql version installed.

mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| protocol_version        | 10                           |
| version                 | 5.1.50-community-log         |
| version_comment         | MySQL Community Server (GPL) |
| version_compile_machine | x86_64                       |
| version_compile_os      | unknown-linux-gnu            |
+-------------------------+------------------------------+
A: 

I found the answer, so I'll pass this along.

1.You must be running the InnoDB plugin instead of the built-in mysql innodb. To do this, you must make these config changes to your my.cnf:

ignore_builtin_innodb

plugin-load                     = innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so

innodb_fast_shutdown            = 0

Note: Load individual plugins, but make sure no spaces between the ";". Also innodb_fast_shutdown is optional, but recommended.

2.You must restart mysqld to take the new config changes.

3.Using your SQL interface, execute: "SELECT @@innodb_version;"

mysql> SELECT @@innodb_version;
+------------------+
| @@innodb_version |
+------------------+
| 1.0.11           |
+------------------+
1 row in set (0.00 sec)

Reference URLs:

Getting the version: http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_version

Using the plugin engine http://dev.mysql.com/doc/refman/5.1/en/replacing-builtin-innodb.html

randy melder
Be careful with generic advice on innodb_fast_shutdown. Your setting here is to completely disable it (which can take quite a while). The other options as 1 and 2. See: http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_fast_shutdown
Morgan Tocker
Yes, there is definitely a difference in behavior of the different shutdown levels. If you are considering running the InnoDB plugin, please read the manual.
randy melder