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:
- INSERT RETURNING works as expected
- DELETE RETURNING deletes the row
- 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
- relates to
-
MCOL-4740 UPDATE returns wrong "Rows matched" on multi-tables
- Closed