diff options
author | Georgi Kodinov <joro@sun.com> | 2009-05-27 18:19:44 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-05-27 18:19:44 +0300 |
commit | c675beab98d90e2f1a606c17d106740d1394071a (patch) | |
tree | ef20b1214af011ce8ef6a3fb904fb115e723cb71 /mysql-test | |
parent | c8a7b7914203a95c30ce45e800f7676744248bf7 (diff) | |
parent | 80730df7d634e1a620c864d6665d6e66ccad447a (diff) | |
download | mariadb-git-c675beab98d90e2f1a606c17d106740d1394071a.tar.gz |
merged 5.0-bugteam to 5.1-bugteam
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/sp-error.result | 10 | ||||
-rw-r--r-- | mysql-test/t/sp-error.test | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 35d61ce757d..17ab2b79043 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -1660,3 +1660,13 @@ declare continue handler for sqlstate '00000' set @x=0; end$$ ERROR 42000: Bad SQLSTATE: '00000' LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT MAX (a) FROM t1 WHERE b = 999999; +ERROR 42000: FUNCTION test.MAX does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual +SELECT AVG (a) FROM t1 WHERE b = 999999; +AVG (a) +NULL +SELECT non_existent (a) FROM t1 WHERE b = 999999; +ERROR 42000: FUNCTION test.non_existent does not exist +DROP TABLE t1; diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 8d7c6d75a34..66b960c938f 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2435,3 +2435,16 @@ delimiter ;$$ # LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc; remove_file $MYSQLTEST_VARDIR/tmp/proc.txt; + +# +# Bug #38159: Function parsing problem generates misleading error message +# + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); +--error ER_FUNC_INEXISTENT_NAME_COLLISION +SELECT MAX (a) FROM t1 WHERE b = 999999; +SELECT AVG (a) FROM t1 WHERE b = 999999; +--error ER_SP_DOES_NOT_EXIST +SELECT non_existent (a) FROM t1 WHERE b = 999999; +DROP TABLE t1; |