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

Unnecessarily large ha_innobase::records_in_range() scans

    XMLWordPrintable

Details

    Description

      The recently added test innodb.innodb_wl6326 hangs in 10.4, because a query

      SELECT a00,a01 FROM t1 WHERE a00 = 'cp';
      

      causes ha_innobase::records_in_range() to be called with min_key=NULL. No secondary indexes have been defined on the table; only PRIMARY KEY(a00,a01,a02,a03,a04,a05,a06).

      That section of the test is demonstrating that only some pages of the table are supposed to be latched.

      The hang is caused by ‘too broad’ ha_innobase::records_in_range() calls. Those calls were introduced by an early commit of MDEV-16188. With the parent of that commit, the following test will not hang:

      git checkout bc43bf3e430c20bc2178e584215bd443054709d6 mysql-test/suite/innodb/t/innodb_wl6326.*
      (cd path/to/build/mysql-test; ./mtr innodb.innodb_wl6326)
      

      I would expect the too broad ha_innobase::records_in_range() calls to cause a performance regression, especially if they are being invoked for each and every query. InnoDB will not cache the results of that call in any way.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.