Details
Description
On shutdown InnoDB waits for all trx structures to be freed. A trx structure is typically freed when a client disconnects. So, on UNINSTALL PLUGIN InnoDB waits for all trx to be freed, and if the current connection (the one running UNINSTALL) has allocated a trx, it can never be freed.
InnoDB needs to free the current connection trx (if any) on shutdown.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Jan Lindström, please review the following patch:
=== modified file 'storage/innobase/handler/ha_innodb.cc' --- storage/innobase/handler/ha_innodb.cc 2014-07-08 14:21:13 +0000 +++ storage/innobase/handler/ha_innodb.cc 2014-07-28 11:45:02 +0000 @@ -2658,6 +2658,13 @@ innobase_end( if (innodb_inited) { + THD *thd= current_thd; + if (thd) { // may be UNINSTALL PLUGIN statement + trx_t* trx = thd_to_trx(thd); + if (trx) + trx_free_for_mysql(trx); + } + srv_fast_shutdown = (ulint) innobase_fast_shutdown; innodb_inited = 0; hash_table_free(innobase_open_tables);