mirror of
https://github.com/MariaDB/server.git
synced 2025-11-05 01:43:31 +03:00
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.
mysql-test/r/udf.result:
Test case to check constants passed UDFs.
mysql-test/t/udf.test:
Test case to check constants passed UDFs.
sql/item_func.cc:
UDF _init functions are now passed the length of the constants, rather than the max length of the var containing the constant.
sql/udf_example.c:
Added check_const_len functions. The check_const_len_init functions checks that lengths of constants are correctly passed.
sql/udf_example.def:
Add new example functions to windows dll export list.
28 lines
418 B
Modula-2
28 lines
418 B
Modula-2
LIBRARY udf_example
|
|
VERSION 1.0
|
|
EXPORTS
|
|
lookup
|
|
lookup_init
|
|
reverse_lookup
|
|
reverse_lookup_init
|
|
metaphon_init
|
|
metaphon_deinit
|
|
metaphon
|
|
myfunc_double_init
|
|
myfunc_double
|
|
myfunc_int_init
|
|
myfunc_int
|
|
sequence_init
|
|
sequence_deinit
|
|
sequence
|
|
avgcost_init
|
|
avgcost_deinit
|
|
avgcost_reset
|
|
avgcost_add
|
|
avgcost_clear
|
|
avgcost
|
|
is_const
|
|
is_const_init
|
|
check_const_len
|
|
check_const_len_init
|