Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.38, 10.0.12
    • Fix Version/s: 5.5.39, 10.0.13
    • Component/s: None
    • Labels:
      None

      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

            Hide
            serg Sergei Golubchik added a comment -

            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);
            
            Show
            serg Sergei Golubchik added a comment - 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);
            Hide
            jplindst Jan Lindström added a comment -

            Hi,

            Only one style comment, InnoDB always uses brackets on if i.e

            + if (trx)

            { + trx_free_for_mysql(trx); + }

            please check also XtraDB. Ok to push with these changes.

            Show
            jplindst Jan Lindström added a comment - Hi, Only one style comment, InnoDB always uses brackets on if i.e + if (trx) { + trx_free_for_mysql(trx); + } please check also XtraDB. Ok to push with these changes.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                serg Sergei Golubchik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: