Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5664

DELETE RETURNING doesn't return deleted rows

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 23.10.0
    • None
    • None

    Description

      MariaDB [test]> CREATE TABLE person (
          ->     name VARCHAR(100) NOT NULL,
          ->     surname VARCHAR(100) NOT NULL
          -> ) ENGINE ColumnStore;
      Query OK, 0 rows affected (0.277 sec)
       
      MariaDB [test]> INSERT INTO person (name, surname) VALUES ('Charlie', 'Parker') RETURNING *;
      +---------+---------+
      | name    | surname |
      +---------+---------+
      | Charlie | Parker  |
      +---------+---------+
      1 row in set (0.136 sec)
       
      MariaDB [test]> SELECT * FROM person WHERE surname = 'Parker';
      +---------+---------+
      | name    | surname |
      +---------+---------+
      | Charlie | Parker  |
      +---------+---------+
      1 row in set (0.051 sec)
       
      MariaDB [test]> DELETE FROM person WHERE surname = 'Parker' RETURNING name, surname;
      Empty set (0.089 sec)
       
      MariaDB [test]> SELECT * FROM person WHERE surname = 'Parker';
      

      As you can see:

      1. INSERT RETURNING works as expected
      2. DELETE RETURNING deletes the row
      3. But the row is not returned by the statement

      If I repeat the test with InnoDB, it correctly returns the deleted row:

      MariaDB [test]> DELETE FROM person WHERE surname = 'Parker' RETURNING name, surname;
      +---------+---------+
      | name    | surname |
      +---------+---------+
      | Charlie | Parker  |
      +---------+---------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              leonid.fedorov Leonid Fedorov
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.