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

Optimizer Trace: Q1 2026 Dev fixes

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Optimizer
    • None

    Description

      Hook records_in_range call

      in opt_range.cc in ror_scan_add, there is a handler->records_in_range() call.
      We need to hook it: save and return back its value.

      Note that ha_something::multi_range_read_info_const() as well as handler::multi_range_read_info_const() also make calls to handler->records_in_range() and we do NOT need to intercept them.

      Example query that uses index_merge/intersection and depends on records_in_range() value:

      INDEX i1(a, b)
      INDEX i2(a, c) 
      select * from t1 where a=1 and b=1 and c=1;
      

      or try INDEX(c,a), INDEX(b, a).

      Attachments

        Issue Links

          Activity

            People

              bsrikanth Srikanth Bondalapati
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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