mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#17261 Passing a variable from a stored procedure to UDF crashes mysqld
- Update of test toolsand Makefiles to make it possible to test always test udf's as part of the mysql test suite mysql-test/mysql-test-run.pl: Add the path where mysqld will udf_example.so used by the udf test mysql-test/r/udf.result: Update test results mysql-test/t/udf.test: Update tests The "--error 0" directives should actually be changed to the correct error number returned but that error number is lost. W e do however get the right error message and that is checked in the .result file. sql/Makefile.am: Build shared library udf_example.so sql/share/errmsg.txt: Update the max length of %s string from 64 to 128 sql/sql_udf.cc: Add DBUG_PRINT just before dl_open sql/udf_example.cc: Use isalpha instade of my_isalpha
This commit is contained in:
@@ -10,7 +10,7 @@ RETURNS STRING SONAME 'udf_example.so';
|
||||
CREATE AGGREGATE FUNCTION avgcost
|
||||
RETURNS REAL SONAME 'udf_example.so';
|
||||
select myfunc_double();
|
||||
ERROR HY000: myfunc_double must have at least on argument
|
||||
ERROR HY000: myfunc_double must have at least one argument
|
||||
select myfunc_double(1);
|
||||
myfunc_double(1)
|
||||
49.00
|
||||
@@ -59,18 +59,18 @@ select metaphon('hello');
|
||||
metaphon('hello')
|
||||
HL
|
||||
CREATE PROCEDURE `XXX1`(in testval varchar(10))
|
||||
begin
|
||||
select metaphon(testval);
|
||||
begin
|
||||
select metaphon(testval);
|
||||
end//
|
||||
call XXX1('hello');
|
||||
metaphon(testval)
|
||||
HL
|
||||
drop procedure xxx1;
|
||||
CREATE PROCEDURE `XXX2`()
|
||||
begin
|
||||
begin
|
||||
declare testval varchar(10);
|
||||
set testval = 'hello';
|
||||
select metaphon(testval);
|
||||
select metaphon(testval);
|
||||
end//
|
||||
call XXX2();
|
||||
metaphon(testval)
|
||||
|
Reference in New Issue
Block a user