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

Multi-table DELETE + RETURNING = parse error

    XMLWordPrintable

Details

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

    Description

      This page:

      https://mariadb.com/kb/en/delete/

      says that the following syntax is supported:

      DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
          tbl_name[.*] [, tbl_name[.*]] ...
          FROM table_references
          [WHERE where_condition]
          [RETURNING select_expr [, select_expr ...]]

      But if I use it I get an error:

      MariaDB [test]> DELETE post FROM blog INNER JOIN post WHERE blog.id = post.blog_id RETURNING post.title;
      ERROR 1064 (42000): 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 'RETURNING post.title' at line 1

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.