diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-13 21:21:38 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-13 21:21:38 +0100 |
commit | 94930f63c82f9a457d20064ba8f7219fd37c6aa6 (patch) | |
tree | 4b24e3ef68d9a65ab5f6793f28e3ac893d454091 /mysql-test/t | |
parent | 98220b93bc3d2ed7c4c92c1984c876a98eabe7cf (diff) | |
parent | 5e508a35d536152d3e02ec478873a312ad5f3682 (diff) | |
download | mariadb-git-94930f63c82f9a457d20064ba8f7219fd37c6aa6.tar.gz |
Merge bk-internal:/home/bk/mysql-5.1-new-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
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; |