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

LP:825075 - Wrong result with multipart key + MIN/MAX loose scan and OR expression in WHERE

    Details

      Description

      The following test case produces wrong result:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 ( a int, b varchar(1), KEY (b,a));
      INSERT INTO t1 VALUES (0,NULL),(9,NULL),(8,'c'),(4,'d'),(7,'d'),(NULL,'f'),(7,'f'),(8,'g'),(NULL,'j');
       
      SELECT a , b FROM t1 WHERE a IS NULL OR b = 'z' ;
      SELECT max(a) , b FROM t1 WHERE a IS NULL OR b = 'z' GROUP BY b; 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timour Timour Katchaounov (Inactive)
                Reporter:
                philipstoev Philip Stoev (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: