diff options
author | unknown <istruewing@stella.local> | 2008-03-14 09:48:57 +0100 |
---|---|---|
committer | unknown <istruewing@stella.local> | 2008-03-14 09:48:57 +0100 |
commit | ce86b14625d2beb4bc57da04da7359b9a85f4868 (patch) | |
tree | b889326c286fb908de15be08924d4b8aecf0c642 /mysql-test/t/func_misc.test | |
parent | e85d6a915d242e8d39f021f4933c450323cec953 (diff) | |
parent | f20fe94b55727fbc69b1cb86af5dc96f216bdd87 (diff) | |
download | mariadb-git-ce86b14625d2beb4bc57da04da7359b9a85f4868.tar.gz |
Merge stella.local:/home2/mydev/mysql-5.0-amain
into stella.local:/home2/mydev/mysql-5.0-axmrg
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/func_misc.test')
-rw-r--r-- | mysql-test/t/func_misc.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 17a0dbe50a7..12824a9b39d 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -205,6 +205,24 @@ SELECT NAME_CONST('test', -1.0); SELECT NAME_CONST('test', 'test'); # +# Bug #34749: Server crash when using NAME_CONST() with an aggregate function +# + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +# NAME_CONST() + aggregate. +SELECT NAME_CONST('flag',1) * MAX(a) FROM t1; +SELECT NAME_CONST('flag',1.5) * MAX(a) FROM t1; +# Now, wrap the INT_ITEM in Item_func_neg and watch the pretty explosions +SELECT NAME_CONST('flag',-1) * MAX(a) FROM t1; +SELECT NAME_CONST('flag',-1.5) * MAX(a) FROM t1; +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('flag', SQRT(4)) * MAX(a) FROM t1; +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('flag',-SQRT(4)) * MAX(a) FROM t1; +DROP TABLE t1; + +# # Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter # resolved against a column name of a derived table hangs the client # |