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

incorrect result when using double NOT on INT column in WHERE

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.8.6
    • 10.11, 11.4, 11.8, 12.3
    • Optimizer
    • None
    • Ubuntu 24.04 LTS x86_64 docker image mariadb:11.8.6

    Description

      In MariaDB, using NOT NOT t0.c0 in the WHERE clause may incorrectly filter out rows.

      CREATE TABLE t0(c0 INT);
      INSERT INTO t0(c0) VALUES(2);
       
      /* should return the row (2), but returns empty set */
      SELECT * FROM t0 WHERE (NOT NOT t0.c0) = 1;
       
      /* returns the row : (2) */
      SELECT * FROM t0 WHERE (NOT NOT t0.c0) = 2;
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            asdWang Weipeng Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.