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

Change of behaviour of OR in IF-conditions 10.2 -> 10.3

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3.11, 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.2.23
    • Optimizer
    • Windows 10, Windows Server 2008

    Description

      The behavior of the OR operator in the IF condition has changed from MariaDB 10.2 to 10.3.
      now I noticed that the following syntax doesn't work in SELECT statements anymore:

      SELECT * FROM tab t WHERE IF(@a = 1, t.a = 1 OR t.b = 1,1=1)
      

      Now I'd have to write:

      SELECT * FROM tab t WHERE (IF(@a = 1, t.a = 1, 1=1) OR IF(@a = 1, t.b = 1, 1=1))
      

      Is it a bug or a deliberate change? Is there a setting with which I can reactivate the previous behavior?

      Attachments

        Issue Links

          Activity

            FriedemannS Friedemann Schmidt created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Labels IF OR SELECT IF OR SELECT need_feedback
            elenst Elena Stepanova made changes -
            Labels IF OR SELECT need_feedback IF OR SELECT
            elenst Elena Stepanova made changes -
            Assignee Alice Sherepa [ alice ]
            Labels IF OR SELECT need_verification
            alice Alice Sherepa made changes -
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            alice Alice Sherepa made changes -
            Labels need_verification
            alice Alice Sherepa made changes -
            Component/s OTHER [ 10125 ]
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ] Galina Shalygina [ shagalla ]
            alice Alice Sherepa made changes -
            Labels regression
            shagalla Galina Shalygina (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            shagalla Galina Shalygina (Inactive) made changes -
            shagalla Galina Shalygina (Inactive) made changes -
            Assignee Galina Shalygina [ shagalla ] Igor Babaev [ igor ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            igor Igor Babaev (Inactive) made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            igor Igor Babaev (Inactive) made changes -
            Assignee Igor Babaev [ igor ] Galina Shalygina [ shagalla ]
            shagalla Galina Shalygina (Inactive) made changes -
            Fix Version/s 10.2.23 [ 23307 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 92066 ] MariaDB v4 [ 155590 ]

            People

              shagalla Galina Shalygina (Inactive)
              FriedemannS Friedemann Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.