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

Syntax Error when using "NOT IN (SELECT"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.1.10
    • N/A
    • None

    Description

      Using a query with "NOT IN (SELECT" triggers a syntax error despite the fact that the query is syntaxically correct. Removing the "NOT" in the query does not trigger an error anymore.

      We simplified the query to show the issue (mytable can be any table)

      select * from mytable where 2 not in ( select 1 from mytable )

      Exact error message is :

      #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 25' at line 1

      Executing the same query under mysql 5.5.46 works as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cimeos Cimeos
            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.