xql_agg returns a NULL

18 views
Skip to first unread message

Bèrto 'd Sèra

unread,
Jun 15, 2008, 12:19:18 AM6/15/08
to The UDF Repository for MySQL
Hi!

everything else works fine, but for some reason xql_agg always return
a null. I'm using:
http://www.mysqludf.org/lib_mysqludf_xql/lib_mysqludf_xql-0.9.6.tar.gz
on Mysql 5.1.24-rc

Question: do I have to declare the UDFs as shown here:
http://dev.mysql.com/doc/refman/5.1/en/udf-compiling.html?

If so, what are the return types?

Thanks
Berto

Bèrto 'd Sèra

unread,
Jun 15, 2008, 1:43:08 AM6/15/08
to The UDF Repository for MySQL
actually I DID declare it as

CREATE FUNCTION xql_agg RETURNS STRING SONAME 'lib_mysqludf_xql.so';

Other problems were solved by this, yet xql_agg doesn't seem to
respond. Also, the .so file appears to be in Mac format, for some
reasons...

Roland Bouman

unread,
Jun 15, 2008, 6:19:13 AM6/15/08
to The UDF Repository for MySQL
Hi!

> CREATE FUNCTION xql_agg RETURNS STRING SONAME 'lib_mysqludf_xql.so';

I think this should be:

CREATE AGGREGATE FUNCTION xql_agg RETURNS STRING SONAME
'lib_mysqludf_xql.so';

(in other words, you forgot the AGGREGATE keyword)

> Other problems were solved by this, yet xql_agg doesn't seem to
> respond. Also, the .so file appears to be in Mac format, for some
> reasons...

I don't understand this remark. What do you mean, "Mac format"?
The .so file is a binary dynamically loadable library.

Bèrto 'd Sèra

unread,
Jun 15, 2008, 11:41:33 PM6/15/08
to The UDF Repository for MySQL
Thanks! that did the trick :) Any other function that should be
declared like that? I mean, it would be nice to have a published
standard script for declaring the functions. I can't seem to find one.
If anyone gives me the list of what is to be declared how I can take
the time to make one and publish it here. I guess it would make things
MUCH simpler for lots of people.

Mac Format: I never saw such a msg before, either. It came out when I
opened the .so in pico to check whether it did contain a header for
xql_agg or not. Chances are it was simply happening because .so are
not supposed to be read by pico.

One final question: Is there a way to extract an element from an XML
string? I'm building an interface that accepts an XML list of jobs to
a PARSER stored proc. From this Stored procedure I simply decide what
specialized FUNCTION is to produce the result. So my format is:
<Joblist>
<job par1="blablabla" par2="moreblabla" etc />
<job par1="blablabla2" par2="moreblabla2" etc />
<job par1="blablabla3" par2="moreblabla3" etc />
</Joblist>

How do I extract the "<job par1="blablabla" par2="moreblabla" etc />"
frag to dispatch it to the proper function? I suppose there must be a
ready-made solution, but I cannot seem to find it.
Thanks
Berto
Reply all
Reply to author
Forward
0 new messages