summaryrefslogtreecommitdiff
path: root/sql/udf_example.cc
diff options
context:
space:
mode:
authorunknown <msvensson@devsrv-b.mysql.com>2006-02-15 17:11:24 +0100
committerunknown <msvensson@devsrv-b.mysql.com>2006-02-15 17:11:24 +0100
commit79258e4480bfacd94384263240feba68f83a9a79 (patch)
treeecb3d7a4c5fccfa3a7864020bfd8137d609c0dde /sql/udf_example.cc
parent86c920ba776ddf5e9999e8293d5824be25bb43b6 (diff)
downloadmariadb-git-79258e4480bfacd94384263240feba68f83a9a79.tar.gz
Bug#17261 Passing a variable from a stored procedure to UDF crashes mysqld
- Pass "buffers[i]" to val_str() in udf_handler::fix_fields insteead of NULL. - Add testcase for UDF that will load and run the udf_example functions if available sql/item_func.cc: Instead of passing a NULL pointer into val_str, use the "buffers" array to provide a temp string buffer. sql/udf_example.cc: Spelling error"on"->"one" mysql-test/include/have_udf.inc: New BitKeeper file ``mysql-test/include/have_udf.inc'' mysql-test/r/have_udf.require: New BitKeeper file ``mysql-test/r/have_udf.require'' mysql-test/r/udf.result: New BitKeeper file ``mysql-test/r/udf.result'' mysql-test/t/udf.test: New BitKeeper file ``mysql-test/t/udf.test''
Diffstat (limited to 'sql/udf_example.cc')
-rw-r--r--sql/udf_example.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/udf_example.cc b/sql/udf_example.cc
index a186b4fbf6c..6ce66157101 100644
--- a/sql/udf_example.cc
+++ b/sql/udf_example.cc
@@ -518,7 +518,7 @@ my_bool myfunc_double_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
{
if (!args->arg_count)
{
- strcpy(message,"myfunc_double must have at least on argument");
+ strcpy(message,"myfunc_double must have at least one argument");
return 1;
}
/*