Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12188

information schema - errors populating fail to free memory, unlock mutexes

    XMLWordPrintable

Details

    Description

      Given the OK macro used in innodb does a DBUG_RETURN(1) on expression failure the innodb implementation has a number of errors in i_s.cc

      In the case of the OK expression failing:

      1. i_s_innodb_buf_page_lru_fill - heap isn't freed
      2. i_s_innodb_buffer_page_fill - deepest index loop - dict_sys->mutex isn't unlocked
      3. i_s_fts_config_fill - fails to close table, unlock dict_operation_lock and possibly clean up trx
      4. i_s_fts_index_cache_fill_one_index fails to free conv_str.f_str
      5. i_s_fts_deleted_generic_fill fails to free deleted, close table, unlock dict_operation_lock and possibly clean up trx

      sync/sync0arr.cc appears safe in its OK usage (from 10.1 onwards)

      In addition to the requirement for this fix, perhaps something like
      (10.2)

      diff --git a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h
      index 8d34fbf..8e455c4 100644
      --- a/storage/innobase/handler/i_s.h
      +++ b/storage/innobase/handler/i_s.h
      @@ -70,6 +70,8 @@ extern struct st_maria_plugin i_s_innodb_sys_semaphore_waits;
       
       #define OK(expr)               \
              if ((expr) != 0) {      \
      +               ib::error() << "Error populating innodb information schema with " \
      +                           << #expr; \
                      DBUG_RETURN(1); \
              }
      
      

      10.0,10.2 are still using fprintf(stderr.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.