List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:October 12 1999 12:01am
Subject:UDF not working in 3.23
View as plain text  
>>>>> "Giussani" == Giussani Cristian <giussani@stripped>
> writes:

>> Description:
Giussani>         When using UDF with parametrs in 3.23 mysqld hangs with a
Giussani> SIGSEGV.
Giussani>         Using gdb seem that the problem is at line 1084 of item_func.cc,

Giussani>         String *res=args[i]->val_str(&buffers[str_count++]);
Giussani>         It seem that args=NULL.
Giussani>         Calling a UDF with no parameters it works.

>> How-To-Repeat:
Giussani>         Compile udf_example.cc with --shared -o udf_example.so
Giussani>         CREATE FUNCTION metaphone RETURNS STRING SONAME
Giussani> "udf_example.so";
Giussani>         SELECT metaphone("Test");
>> Fix:

Hi!

Sorry for the delay.

Here is a fix for this:

*** /my/monty/master/mysql-3.23.4-alpha/sql/item_func.cc	Thu Sep 23 01:53:58 1999
--- ./item_func.cc	Tue Oct 12 02:33:04 1999
***************
*** 955,960 ****
--- 955,961 ----
      DBUG_RETURN(1);
    }
    u_d=tmp_udf;
+   args=arguments;
  
    /* Fix all arguments */
    func->binary=func->maybe_null=0;

Regards,
Monty
Thread
UDF not working in 3.23Giussani Cristian7 Oct
  • UDF not working in 3.23Michael Widenius12 Oct