From 79258e4480bfacd94384263240feba68f83a9a79 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Feb 2006 17:11:24 +0100 Subject: 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'' --- sql/udf_example.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/udf_example.cc') 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; } /* -- cgit v1.2.1