diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-11-13 13:19:13 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-11-13 13:19:13 -0500 |
commit | 1aad990179bf95892e3dc23018a92598e4856f20 (patch) | |
tree | 1cd7d6234dca63d740a1b622d46546471f574ba8 /mysql-test/t | |
parent | 8b01c318c099f065ec7895efe887a305eca3017e (diff) | |
parent | 154c6e06775d6e644fd4e5f863104ab566fc4a68 (diff) | |
download | mariadb-git-1aad990179bf95892e3dc23018a92598e4856f20.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my50-bug18761
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
BitKeeper/etc/collapsed:
auto-union
sql/item_func.cc:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/udf.test | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test index 96e559f5c05..c62d7829b05 100644 --- a/mysql-test/t/udf.test +++ b/mysql-test/t/udf.test @@ -143,4 +143,41 @@ DROP FUNCTION lookup; DROP FUNCTION reverse_lookup; DROP FUNCTION avgcost; - +# +# Bug#18761: constant expression as UDF parameters not passed in as constant +# +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; + +select + is_const(3) as const, + is_const(3.14) as const, + is_const('fnord') as const, + is_const(2+3) as const, + is_const(rand()) as 'nc rand()', + is_const(sin(3.14)) as const, + is_const(upper('test')) as const; + +create table bug18761 (n int); +insert into bug18761 values (null),(2); +select + is_const(3) as const, + is_const(3.14) as const, + is_const('fnord') as const, + is_const(2+3) as const, + is_const(2+n) as 'nc 2+n ', + is_const(sin(n)) as 'nc sin(n)', + is_const(sin(3.14)) as const, + is_const(upper('test')) as const, + is_const(rand()) as 'nc rand()', + is_const(n) as 'nc n ', + is_const(is_const(n)) as 'nc ic?(n)', + is_const(is_const('c')) as const +from + bug18761; +drop table bug18761; + +--error 1241 +select is_const((1,2,3)); + +drop function if exists is_const; |