mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug #31742: delete from ... order by function call that causes
an error, asserts server In case of a fatal error during filesort in find_all_keys() the error was returned without the necessary handler uninitialization. Fixed by changing the code so that handler uninitialization is performed before returning the error. mysql-test/r/delete.result: Added a test case for bug #31742. mysql-test/t/delete.test: Added a test case for bug #31742. sql/filesort.cc: In case of a fatal error in find_all_keys() do not return before doing the necessary handler uninitialization steps.
This commit is contained in:
@ -277,3 +277,18 @@ SELECT * FROM t1;
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
|
||||
#
|
||||
# Bug 31742: delete from ... order by function call that causes an error,
|
||||
# asserts server
|
||||
#
|
||||
|
||||
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
--error 1318
|
||||
DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user