Hi,
My initialization for UDF is quite simple:
my_bool do_system_init(UDF_INIT *initid, UDF_ARGS
*args, char *message)
{
        initid->max_length = 256;
        initid->maybe_null=1;
        args->arg_type[0]=STRING_RESULT;
        initid->ptr = NULL;

        return 0;
}

But I got:
Welcome to the MySQL monitor.  Commands end with ; or
\g.
Your MySQL connection id is 13 to server version:
5.0.18-log

Type 'help;' or '\h' for help. Type '\c' to clear the
buffer.

mysql> select * from mysql.func;
+-----------+-----+-----------+----------+
| name      | ret | dl        | type     |
+-----------+-----+-----------+----------+
| myperl    |   0 | myperl.so | function |
| do_system |   2 | udf.so    | function |
+-----------+-----+-----------+----------+
2 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and
column names
You can turn off this feature to get a quicker startup
with -A

Database changed
mysql> select do_system('id > /tmp/out');
ERROR 1123 (HY000): Can't initialize function
'do_system';

How can I initialize my UDF ?
Thanks


 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to