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

Qualified asterisk not supported in INSERT .. RETURNING

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

          Transition Time In Source Status Execution Times
          Elena Stepanova made transition -
          Open Confirmed
          20d 10h 21m 1
          Rucha Deodhar made transition -
          Confirmed In Progress
          1d 12h 57m 1
          Rucha Deodhar made transition -
          Stalled In Progress
          4d 1h 32m 1
          Rucha Deodhar made transition -
          In Progress In Review
          251d 2h 5m 2
          Rucha Deodhar made transition -
          Stalled In Review
          1d 17h 48m 3
          Sergei Golubchik made transition -
          In Review Stalled
          93d 6h 38m 5
          Rucha Deodhar made transition -
          Stalled Closed
          3h 5m 1

          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.