Details
-
New Feature
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
-
None
Description
Delete doesn't work with LIMIT and Hints and I don't find any specific reason behind this. Even not in documentation.
MariaDB [test]> DELETE t1.* FROM test1 t1 WHERE ID=1;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [test]> DELETE t1.* FROM test1 t1 WHERE ID=1 LIMIT 10;
|
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 'LIMIT 10' at line 1
|
MariaDB [test]>
|
|
MariaDB [test]> DELETE t1.* FROM test1 t1 use index(ix_id) WHERE ID = 1 limit 10;
|
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 'limit 10' at line 1
|
MariaDB [test]>
|
|
Doc says, "For the multiple-table syntax, DELETE deletes from each tbl_name the rows that satisfy the conditions. In this case, ORDER BY and LIMIT> cannot be used." But here there are no multiple tables.
https://mariadb.com/kb/en/delete/
Attachments
Issue Links
- relates to
-
MDEV-32212 DELETE with ORDER BY and semijoin optimization causing crash
- Closed