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

Impossible WHERE noticed after reading const tables

    XMLWordPrintable

Details

    • Unexpected results
    • Q2/2026 Server Development

    Description

      Issue seen in gcol.gcol_ins_upd_innodb

      Issue:

      ---------
      Difference in explain output

      How to repro

      source  [^capture.txt] 
      source context1.txt
      

      First Explain:

      +------+-------------+-------+-------+---------------+---------+---------+-------+------+--------------------------------+
      | id   | select_type | table | type  | possible_keys | key     | key_len | ref   | rows | Extra                          |
      +------+-------------+-------+-------+---------------+---------+---------+-------+------+--------------------------------+
      |    1 | PRIMARY     | OUTR1 | const | PRIMARY       | PRIMARY | 4       | const | 1    |                                |
      |    1 | PRIMARY     | INNR1 | ALL   | NULL          | NULL    | NULL    | NULL  | 2    | Using where; FirstMatch(OUTR1) |
      |    1 | PRIMARY     | OUTR2 | ALL   | NULL          | NULL    | NULL    | NULL  | 2    |                                |
      +------+-------------+-------+-------+---------------+---------+---------+-------+------+--------------------------------+
      [code}
       
      h6.Replay:
      {code:sql}
      +------+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+
      | id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra                                               |
      +------+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+
      |    1 | PRIMARY     | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL | Impossible WHERE noticed after reading const tables |
      +------+-------------+-------+------+---------------+------+---------+------+------+----------------------------------------------------
      

      Attachments

        Activity

          People

            bsrikanth Srikanth Bondalapati
            mariadb-pavithrapandith Pavithra Pandith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5h Time Not Required
                0.5h

                Git Integration

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