Friday, September 4, 2009

Configuring INFORMATION_SCHEMA Plugin Tables for InnoDB Plugin

There are seven new INFORMATION_SCHEMA tables (plugins) available with the InnoDB plugin.  They need to be loaded to be used.

New InnoDB Plugins contain information on:
  • Compressed InnoDB tables
  • Compressed InnoDB buffer pool
  • Current InnoDB transactions
  • Transaction Locks
  • Blocking transactions
These INFORMATION_SCHEMA plugins are available by setting the plugin-load parmeter:

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

mysql> SELECT table_name, engine, table_type FROM information_schema.tables
             WHERE table_name LIKE 'innodb%'
 
table_nameenginetable_type
INNODB_CMP_RESETMEMORYSYSTEM VIEW
INNODB_TRXMEMORYSYSTEM VIEW
INNODB_CMPMEM_RESETMEMORYSYSTEM VIEW
INNODB_CMPMEMORYSYSTEM VIEW
INNODB_CMPMEMMEMORYSYSTEM VIEW
INNODB_LOCKSMEMORYSYSTEM VIEW


Before loading plugin tables: 

mysql>  SHOW PLUGINS;
NameStatusTypeLibraryLicense
binlogACTIVESTORAGE ENGINEGPL
ARCHIVEACTIVESTORAGE ENGINEGPL
BLACKHOLEACTIVESTORAGE ENGINEGPL
CSVACTIVESTORAGE ENGINEGPL
FEDERATEDDISABLEDSTORAGE ENGINEGPL
MEMORYACTIVESTORAGE ENGINEGPL
MyISAMACTIVESTORAGE ENGINEGPL
MRG_MYISAMACTIVESTORAGE ENGINEGPL
partitionACTIVESTORAGE ENGINEGPL
InnoDBACTIVESTORAGE ENGINEha_innodb_plugin.dllGPL

After loading plugin tables: 

mysql>  SHOW PLUGINS;

NameStatusTypeLibraryLicense
binlogACTIVESTORAGE ENGINEGPL
ARCHIVEACTIVESTORAGE ENGINEGPL
BLACKHOLEACTIVESTORAGE ENGINEGPL
CSVACTIVESTORAGE ENGINEGPL
FEDERATEDDISABLEDSTORAGE ENGINEGPL
MEMORYACTIVESTORAGE ENGINEGPL
MyISAMACTIVESTORAGE ENGINEGPL
MRG_MYISAMACTIVESTORAGE ENGINEGPL
partitionACTIVESTORAGE ENGINEGPL
InnoDBACTIVESTORAGE ENGINEha_innodb_plugin.dllGPL
INNODB_TRXACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL
INNODB_LOCKSACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL
INNODB_CMPACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL
INNODB_CMP_RESETACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL
INNODB_CMPMEMACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL
INNODB_CMPMEM_RESETACTIVEINFORMATION SCHEMAha_innodb_plugin.dllGPL

InnoDB parameters example:
[mysqld]
basedir="C:/mysql/5.1.38/"
datadir="C:/mysql/Data/"

#*** INNODB Specific options ***
ignore-builtin-innodb
plugin-load=innodb=ha_innodb_plugin.dll;innodb_trx=ha_innodb_plugin.dll;innodb_locks=ha_innodb_plugin.dll;innodb_cmp=ha_innodb_plugin.dll;innodb_cmp_reset=ha_innodb_plugin.dll;innodb_cmpmem=ha_innodb_plugin.dll;innodb_cmpmem_reset=ha_innodb_plugin.dll

plugin_dir="C:/mysql/5.1.38/lib/plugin"

default-storage-engine=INNODB
innodb_data_home_dir="C:/mysql/innodb"

innodb_data_file_path=ibdata1:1G;ibdata2:1G:autoextend
innodb_autoextend_increment=100
innodb_log_group_home_dir="C:/mysql/innologs"

innodb_buffer_pool_size=120M
innodb_log_file_size=100M

No comments: