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

LP:727667 - Wrong result with OR + NOT NULL in maria-5.3

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Not reproducible in maria-5.2. The following query:

      SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'q' AND f3 IS NULL);

      returns

      ----------+

      f3 f10

      ----------+

      NULL r

      ----------+

      which is obviously wrong since neither f3 = 83 nor f10 = 'q'

      test case:

      CREATE TABLE t1 (
      f3 int(11),
      f10 varchar(1),
      KEY (f3)
      );
      INSERT IGNORE INTO t1 VALUES ('9','k'),(NULL,'r');

      SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL);

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-03-01 10:22:22 +0300
      build-date: 2011-03-02 11:45:01 +0200
      revno: 2928
      branch-nick: maria-5.3

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.