Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1029

Logic issue breaking multiple where conditions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.11, 1.1.1
    • Fix Version/s: 1.0.12, 1.1.3
    • Component/s: None
    • Labels:
      None

      Description

      An always-true WHERE condition added to a query with at least 2 normal WHERE conditions generates more results. Essentially removing the first WHERE condition.

      Example with partsupp table:

      select ps_partkey, ps_suppkey from partsupp where ps_availqty<4093 and ps_supplycost < 500;
      ...
      163216 rows in set (0.73 sec)
       
      select ps_partkey, ps_suppkey from partsupp where ps_availqty<4093 and ps_supplycost < 500 and (TRUE OR FALSE);
      ...
      563399 rows in set (2.00 sec)
      

      This happens with:

      AND (1=1 OR 0=0)
      AND (TRUE OR FALSE)
      AND ('test' = 'test' OR 'test' = 'aaa')
      

        Attachments

          Activity

            People

            Assignee:
            dleeyh Daniel Lee
            Reporter:
            LinuxJedi Andrew Hutchings (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.