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

Qualified asterisk not supported in INSERT .. RETURNING

    XMLWordPrintable

Details

    Description

      The following script shows how to reproduce the issue:

      create table t (i int primary key auto_increment, j int);
       
      -- These work
      insert into t (j) values (1) returning *;
      insert into t (j) values (1) returning t.i, t.j;
       
      -- This doesn't work
      insert into t (j) values (1) returning t.*;
      

      The last statement produces the following error message:

      SQL-Fehler [1051] [42S02]: (conn:5) Unknown table 'test.t'
      

      I don't see a reason from the documentation why this syntax wouldn't be allowed, given that:

      1. Unqualified asterisks are possible as per the first statement
      2. Qualified column references are possible as per the second statement
      3. The manual refers to select_expr being expected, without any further restrictions: https://mariadb.com/kb/en/insertreturning/

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            lukas.eder Lukas Eder
            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.