Hi all, I have a weired (for me at least) problem with a user defined function, written in C. The function seems to return different results in different runs (the code of the function does not contain random elements). Basically, the function calculates a score based on a column in a table and an input value. So I do something like this: select * from table order by udf(column, 'input_value') desc; For my understanding, this should give the same result always. But if I run many statements (execution is from a java program and I can do it in parallel threads) so that they overlap (the udf on a large table takes 5-10 s on a slow machine), the results of some queries are different. If I have enough time between statements, it seems to work, i. e. the result is always the same. I would have thought the statements are independent, even if executed on different jdbc connections in parallel. Does somebody have an idea? Or could somebody give an idea on debugging? Normally I would try to debug the code to see what goes on, but how can I do this in a udf? Can I log in the udf? Thanks for any hints, Stefan
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Nov 04
Michael Dykman Re: UDF behaves non-deterministic
Nov 04, 2012; 17:34
Michael Dykman
Re: UDF behaves non-deterministic
Nov 05
Stefan Kuhn Re: UDF behaves non-deterministic
Nov 05, 2012; 00:25
Stefan Kuhn
Re: UDF behaves non-deterministic
Nov 04
Dan Nelson Re: UDF behaves non-deterministic
Nov 04, 2012; 18:05
Dan Nelson
Re: UDF behaves non-deterministic
Nov 05
Michael Dykman Re: Re: UDF behaves non-deterministic
Nov 05, 2012; 10:08
Michael Dykman
Re: Re: UDF behaves non-deterministic
Nov 05
walter harms Re: UDF behaves non-deterministic
Nov 05, 2012; 19:45
walter harms
Re: UDF behaves non-deterministic
Nov 05
hsv Re: UDF behaves non-deterministic
Nov 05, 2012; 13:02
hsv
Re: UDF behaves non-deterministic
Nov 05
Stefan Kuhn Re: UDF behaves non-deterministic
Nov 05, 2012; 23:31
Stefan Kuhn
Re: UDF behaves non-deterministic
Nov 07
Stefan Kuhn Re: UDF behaves non-deterministic
Nov 07, 2012; 21:54
Stefan Kuhn
Re: UDF behaves non-deterministic
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!