UDF Repository for MySQL bugs - All Projects: Recently opened tasks Feed for all projects http://bugs.mysqludf.org/ 2010-06-08T08:08:01Z FS#22: Incorrect parameters in the call to stored function xql_element 2010-06-08T08:08:01Z 2010-06-08T08:08:01Z
We have new server set up with Linux and Mysql.
We have installed lib_mysqludf_xql there. In old server strored procedure which use mysqludf working fine , the code is

SET @qry = concat('select xql_agg(''manufacturers'' as `xql:root`, xql_element('
,' ''manufacturer'' as `xql:child`, manufacturername, manufacturerid as id, pcount)) from'
,' (select pm.manufacturerid, pm.manufacturername, count(*) as pcount from ', @tprod
,' pm LEFT JOIN ',@tprice, ' pr ON pm.productid = pr.productid where 1=1', @condn
, ' group by pm.manufacturerid, pm.manufacturername)as t INTO @mfrlist');

PREPARE qry from @qry; EXECUTE qry; DEALLOCATE PREPARE qry;

In old server mysql location is in “var\lib” but on new server it is in “data02\mysql”.

Also we face proplem while installing lib_mysqludf_xql but finally it got installed. I am new to Linux and Mysql environment, error “Incorrect parameters in the call to stored function 'xql_element'” it is showing even lib_mysqludf_xql is not installed even after lib_mysqludf_xql is installed same error is there.
Anonymous user http://bugs.mysqludf.org/:22
FS#21: Incorrect parameters in the call to stored function 'xql_element' 2010-06-08T08:06:52Z 2010-06-08T08:06:52Z
We have new server set up with Linux and Mysql.
We have installed lib_mysqludf_xql there. In old server strored procedure which use mysqludf working fine , the code is

SET @qry = concat('select xql_agg(''manufacturers'' as `xql:root`, xql_element('
,' ''manufacturer'' as `xql:child`, manufacturername, manufacturerid as id, pcount)) from'
,' (select pm.manufacturerid, pm.manufacturername, count(*) as pcount from ', @tprod
,' pm LEFT JOIN ',@tprice, ' pr ON pm.productid = pr.productid where 1=1', @condn
, ' group by pm.manufacturerid, pm.manufacturername)as t INTO @mfrlist');

PREPARE qry from @qry; EXECUTE qry; DEALLOCATE PREPARE qry;

In old server mysql location is in “var\lib” but on new server it is in “data02\mysql”.

Also we face proplem while installing lib_mysqludf_xql but finally it got installed. I am new to Linux and Mysql environment, error “Incorrect parameters in the call to stored function 'xql_element'” it is showing even lib_mysqludf_xql is not installed even after lib_mysqludf_xql is installed same error is there.
Anonymous user http://bugs.mysqludf.org/:21
FS#20: \. is not correctly parsed 2010-03-19T21:20:30Z 2010-03-19T21:20:30Z
\. is not correctly parsed you have to do [\.]

ex:
SELECT PREG_CAPTURE("/\./", "a"); //returns a - should return null
SELECT PREG_CAPTURE("/\./", "."); //correctly returns .
SELECT PREG_CAPTURE("/[\.]/", "a"); //correctly returns null
SELECT PREG_CAPTURE("/[\.]/", "."); //correctly returns .
Anonymous user http://bugs.mysqludf.org/:20
FS#19: THE SYS_EXEC NOT WORKING 2010-01-21T12:38:31Z 2010-01-21T12:38:31Z
The sys_exec didn't execute the command in arg.
I am trying execute a ruby script but nothing happens
Neither the sys_eval is execute the command in arg
I was try:
mysql> SELECT sys_eval('id');
+----------------+
| sys_eval('id') |
+----------------+
| |
+----------------+
1 row in set (0,00 sec)
Anonymous user http://bugs.mysqludf.org/:19
FS#18: 64 bit windows version requested 2009-12-15T02:08:32Z 2009-12-15T02:08:32Z
I downloaded the windows DLLs on your site and tried to apply them on our server. Unfortunately the binaries are 32 bit only and the MYSQL instance is 64 bit so they will not register.

Can you put me in touch with the author? I would like to see if they could compile a 64 bit windows version to add to the binaries. I see that the source is available but I do not have the compiler in question.


Anonymous user http://bugs.mysqludf.org/:18
FS#16: Bad use of args->args[0] 2009-09-30T18:36:26Z 2009-09-30T18:36:26Z
In the code of all the functions, the variable
args->args[0]
is used without consider the length of the parameter string with
args->lengths[0]
Anonymous user http://bugs.mysqludf.org/:16
FS#15: lib_mysqludf_xql crashes mysqld process on windows after several queries 2009-11-23T22:53:12Z 2009-09-25T17:02:13Z
I'm using the binary build of lib_mysqludf_xql on wiindows and I'm having trouble where it crashes the mysqld daemon.

I've been able to reporduce this with a very simple test case. I run the following query 500 times in two separate windows:

select
xql_element('my-element', 'my content $i') as value
;

Here's the bash script that I use to run this query 500 times (run this from a remote linux box; update db host, db name, username, and password):

#!/bin/bash
target_host=123.456.789.123
for ((i=0; i < 500; i++))
do
echo "before $i"
mysql --xml -h $target_host --user=myuser --password=mypassword mydb << EOF
select
xql_element('my-element', 'my content $i') as value
;
EOF
echo "after $i"
echo "before sleeping"
sleep 0.1
echo "after sleeping"
done


When I'm running this script in two separate windows, it seems to die about 100 iterations in. I've also had mysql die when just running one copy of the script, but that's not as quick to produce (and it's made it through all 500 iterations without any problems a couple times).

My real query builds a more complex xml document and it dies much sooner.

Matt
Anonymous user http://bugs.mysqludf.org/:15
FS#14: sys_exec is not executing the external commands 2009-08-12T16:35:49Z 2009-08-12T16:35:49Z
Hi All,

Sorry, In my previous thread, my emaild was incorrect.

I'm trying to run the external command from sys_exec, but I could not.

I'm exactly trying to run a perl script, which intern deletes a directory.
When I execute the below sql query it returning code is "3328"
SELECT sys_exec('perl /root/temp/test.pl');

When I checked the directory, it was not deleted, where as same command when I run
through command line directory it's deleting the directory.

some thing like "perl /root/temp/test.pl"

Can any one suggest us, what might be problem and possible solution to it.

To Install the sys_exec, I have followed the documentation provided on your site,
as downloading lib_mysqludf_sys_0.0.3.tar and running the install.sh file.

Any help is highly appreciated.


Thanks.
Anonymous user http://bugs.mysqludf.org/:14
FS#11: Signal 11 when using sys_eval more than once 2009-01-26T22:37:11Z 2009-01-26T22:37:11Z
When using sys_eval, a SIG 11 is raised:
select sys_eval('ls -l existing_file');
select sys_eval('ls -l non_existing_file');
The problem is that the malloc or realloc length is too short because result[outlen]=0 needs a length of outlen+1
There are also not tested returns of functions.
And if result is null, the test !(*result) produces a core under Linux
According to me, a better implementation would be :
char* sys_eval(
UDF_INIT *initid
, UDF_ARGS *args
, char* result
, unsigned long* length
, char *is_null
, char *error
){
FILE *pipe;
char line[1024];
unsigned long outlen, linelen;

pipe = popen(args->args[0], "r");
if (pipe == NULL) {
*is_null = 1;
return NULL;
}

outlen = 0;
result = NULL;

while (fgets(line, sizeof(line), pipe) != NULL) {
linelen = strlen(line);
if (linelen > 0) {
if (outlen == 0)
result = malloc(linelen + 1);
else
result = realloc(result, outlen + linelen + 1);
if (result == NULL) break;
strncpy(result + outlen, line, linelen);
outlen = outlen + linelen;
}
}

pclose(pipe);

if (result == NULL || !(*result)) {
*is_null = 1;
} else {
result[outlen] = 0x00;
*length = strlen(result);
}

return result;
}

Hope it helps.
Bernard
Anonymous user http://bugs.mysqludf.org/:11
FS#10: preg_replace(pattern, replacement, str) returns empty string when replacement is NULL 2009-01-23T16:57:16Z 2009-01-23T16:57:16Z
preg_replace(pattern, replacement, str) returns empty string when replacement is NULL
mysql-5.1.22
Anonymous user http://bugs.mysqludf.org/:10