diff options
author | unknown <kaa@polly.(none)> | 2007-10-23 16:24:56 +0400 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-10-23 16:24:56 +0400 |
commit | 72bd96aef3e6241d1342d652e80ca79b78fd28cf (patch) | |
tree | 9a33ab79bacaed135de88295620779b188800746 /mysql-test | |
parent | f7f8ca8bd7393fe05a38f154031204732ddd2986 (diff) | |
parent | 2d4639c40b5ba9912ade795abf4c4153d038dcda (diff) | |
download | mariadb-git-72bd96aef3e6241d1342d652e80ca79b78fd28cf.tar.gz |
Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into polly.(none):/home/kaa/src/opt/mysql-5.0-opt
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/delete.result | 8 | ||||
-rw-r--r-- | mysql-test/t/delete.test | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 5084498c01c..eb93c69d960 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -271,3 +271,11 @@ a DROP TABLE t1, t2; DROP DATABASE db1; DROP DATABASE db2; +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0); +DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1; +ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1 +DROP TABLE t1; +DROP FUNCTION f1; +End of 5.0 tests 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 |