mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
delete.result, delete.test:
Added a test case for bug #8392. sql_delete.cc: Fixed bug #8392. The bug caused a crash for a delete statement with ORDER BY that explicitly referred to the modified table.
This commit is contained in:
@ -61,3 +61,12 @@ select * from t1;
|
||||
a b
|
||||
1 apple
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( a int PRIMARY KEY );
|
||||
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
|
||||
INSERT INTO t1 VALUES (0),(1),(2);
|
||||
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
0
|
||||
2
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user