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

Equal field propagation is not performed any longer for the IN list when multiple comparison types

Details

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1),(2);
      EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1 AND 1 IN (1,a,'3');
      SHOW WARNINGS;

      used to return:

      +-------+------+----------------------------------------------------------------------------+
      | Level | Code | Message                                                                    |
      +-------+------+----------------------------------------------------------------------------+
      | Note  | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 1) |
      +-------+------+----------------------------------------------------------------------------+

      Now it returns:

      +-------+------+-----------------------------------------------------------------------------------------------------------------+
      | Level | Code | Message                                                                                                         |
      +-------+------+-----------------------------------------------------------------------------------------------------------------+
      | Note  | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and (1 in (1,`test`.`t1`.`a`,'3'))) |
      +-------+------+-----------------------------------------------------------------------------------------------------------------+

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.1.7 [ 19604 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Fix Version/s 10.1.8 [ 19605 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            Labels propagation
            bar Alexander Barkov made changes -
            Labels propagation propagation upstream-not-affected
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 71364 ] MariaDB v4 [ 149577 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.