INNODB         InnoDB Plugin in MySQL 5.1         Giuseppe MaxiaThis work is licensed under the Creative Commons Attributi...
Missed announcement                    •       A GA release                    •       As of MySQL 5.1.47                 ...
INNODB 1.0.9                            5.1Friday, December 10, 2010
INNODB 1.0.9                            5.1Friday, December 10, 2010
MySQL                            INFORMATION                            InnoDB plugin   SCHEMA table plugin             Se...
Installation (1)my.cnf[mysqld]plugin_dir = /usr/local/mysql/lib/pluginignore_builtin_innodbplugin-load=innodb=ha_innodb_pl...
Installation (1a)my.cnf[mysqld]plugin-load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innod...
Installation (2)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
Installation - 2nd method (1)my.cnf[mysqld]ignore_builtin_innodbFriday, December 10, 2010
Installation - 2nd method (2)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
Installation - 2nd method (3)mysqlINSTALL PLUGIN INNODB SONAME ha_innodb_plugin.so;INSTALL PLUGIN INNODB_TRX SONAMEha_inno...
Installation - 2nd method (4)my.cnf[mysqld]default-storage-engine=InnoDBinnodb_file_per_table=1innodb_file_format=barracud...
Installation - 2nd method (5)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
Installation differences         •       Method 1 (plugin-load in my.cnf)               ✦       Only one operation        ...
CAVEAT      •       If you uninstall the InnoDB plugin, remember:            ✦       The tables are not backward compatibl...
hands onFriday, December 10, 2010
Checking installationselect @@version, @@innodb_version;+-----------+------------------+| @@version | @@innodb_version |+-...
Detecting lockssession1> select c from t1 for update;+------+| c    |+------+| aaa || bbb || ccc |+------+Friday, December...
Detecting lockssession2> select c from t1 for update;[… waiting]Friday, December 10, 2010
Detecting lockssession3> select i from t1 for update;[… waiting]Friday, December 10, 2010
getting locks informationSELECT  r.trx_id waiting_trx_id,  r.trx_mysql_thread_id waiting_thread,  r.trx_query waiting_quer...
getting locks informationFriday, December 10, 2010
getting locks information************* 1.            row ************** waiting_trx_id:            711 waiting_thread:    ...
getting locks information************* 2.            row ************** waiting_trx_id:            711 waiting_thread:    ...
getting locks information************* 3.            row ************** waiting_trx_id:            710 waiting_thread:    ...
THANKS                        For more info,                       search my blog:              http://datacharmer.blogspo...
Upcoming SlideShare
Loading in …5
×

Innodb plugin in MySQL 5.1

2,865 views

Published on

How to install and use the InnoDB plugin in MySQL 5.1

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,865
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
47
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Innodb plugin in MySQL 5.1

  1. 1. INNODB InnoDB Plugin in MySQL 5.1 Giuseppe MaxiaThis work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California,94105, USA.Friday, December 10, 2010
  2. 2. Missed announcement • A GA release • As of MySQL 5.1.47 • The InnoDB plugin is GA • Ready to use for immediate gainsFriday, December 10, 2010
  3. 3. INNODB 1.0.9 5.1Friday, December 10, 2010
  4. 4. INNODB 1.0.9 5.1Friday, December 10, 2010
  5. 5. MySQL INFORMATION InnoDB plugin SCHEMA table plugin ServerFriday, December 10, 2010
  6. 6. Installation (1)my.cnf[mysqld]plugin_dir = /usr/local/mysql/lib/pluginignore_builtin_innodbplugin-load=innodb=ha_innodb_plugin.sodefault-storage-engine=InnoDBinnodb_file_per_table=1innodb_file_format=barracudainnodb_strict_mode=1Friday, December 10, 2010
  7. 7. Installation (1a)my.cnf[mysqld]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#(all in one line with no spaces)Friday, December 10, 2010
  8. 8. Installation (2)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
  9. 9. Installation - 2nd method (1)my.cnf[mysqld]ignore_builtin_innodbFriday, December 10, 2010
  10. 10. Installation - 2nd method (2)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
  11. 11. Installation - 2nd method (3)mysqlINSTALL PLUGIN INNODB SONAME ha_innodb_plugin.so;INSTALL PLUGIN INNODB_TRX SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_LOCKS SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_LOCK_WAITS SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_CMP SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_CMP_RESET SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_CMPMEM SONAMEha_innodb_plugin.so;INSTALL PLUGIN INNODB_CMPMEM_RESET SONAMEha_innodb_plugin.so;Friday, December 10, 2010
  12. 12. Installation - 2nd method (4)my.cnf[mysqld]default-storage-engine=InnoDBinnodb_file_per_table=1innodb_file_format=barracudainnodb_strict_mode=1Friday, December 10, 2010
  13. 13. Installation - 2nd method (5)SET GLOBAL innodb_fast_shutdown=0;RESTART the serverFriday, December 10, 2010
  14. 14. Installation differences • Method 1 (plugin-load in my.cnf) ✦ Only one operation ✦ But error prone (one looooong command) ✦ plugins not stored in mysql.plugin table • Method 2 (install plugin) ✦ plugin info saved to mysql.plugin table ✦ Easier to write ✦ 2 restarts requiredFriday, December 10, 2010
  15. 15. CAVEAT • If you uninstall the InnoDB plugin, remember: ✦ The tables are not backward compatible ✦ You must uninstall all the INFORMATION_SCHEMA plugin tables BEFORE removing the InnoDB plugin ✦ If the plugin is busy, it may not be removed until you restart the serverFriday, December 10, 2010
  16. 16. hands onFriday, December 10, 2010
  17. 17. Checking installationselect @@version, @@innodb_version;+-----------+------------------+| @@version | @@innodb_version |+-----------+------------------+| 5.1.48 | 1.0.9 |+-----------+------------------+ O EM DFriday, December 10, 2010
  18. 18. Detecting lockssession1> select c from t1 for update;+------+| c |+------+| aaa || bbb || ccc |+------+Friday, December 10, 2010
  19. 19. Detecting lockssession2> select c from t1 for update;[… waiting]Friday, December 10, 2010
  20. 20. Detecting lockssession3> select i from t1 for update;[… waiting]Friday, December 10, 2010
  21. 21. getting locks informationSELECT r.trx_id waiting_trx_id, r.trx_mysql_thread_id waiting_thread, r.trx_query waiting_query, b.trx_id blocking_trx_id, b.trx_mysql_thread_id blocking_thread, b.trx_query blocking_queryFROM innodb_lock_waits w INNER JOIN innodb_trx b ON b.trx_id = w.blocking_trx_id INNER JOIN innodb_trx r ON r.trx_id = w.requesting_trx_idFriday, December 10, 2010
  22. 22. getting locks informationFriday, December 10, 2010
  23. 23. getting locks information************* 1. row ************** waiting_trx_id: 711 waiting_thread: 3 waiting_query: select c from t1 forupdateblocking_trx_id: 710blocking_thread: 2 blocking_query: select i from t1 forupdateFriday, December 10, 2010
  24. 24. getting locks information************* 2. row ************** waiting_trx_id: 711 waiting_thread: 3 waiting_query: select c from t1 forupdateblocking_trx_id: 70Fblocking_thread: 1 blocking_query: NULLFriday, December 10, 2010
  25. 25. getting locks information************* 3. row ************** waiting_trx_id: 710 waiting_thread: 2 waiting_query: select i from t1 forupdateblocking_trx_id: 70Fblocking_thread: 1 blocking_query: NULLFriday, December 10, 2010
  26. 26. THANKS For more info, search my blog: http://datacharmer.blogspot.comThis work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.Friday, December 10, 2010

×