diff options
author | unknown <kaa@polly.(none)> | 2007-10-22 16:10:08 +0400 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-10-22 16:10:08 +0400 |
commit | bbce18c303f1779ee5386b4f1aedf3de3e19b97c (patch) | |
tree | 977554b760b3dfaac163a7d3e2a383e639907522 /mysql-test/t/delete.test | |
parent | 04311fabaa11105743ce124de283cd504c978cc4 (diff) | |
download | mariadb-git-bbce18c303f1779ee5386b4f1aedf3de3e19b97c.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/delete.test')
-rw-r--r-- | mysql-test/t/delete.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 8a03cb6c715..602e30687c8 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -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 |