Thank's for your answer.
> the data is as you believe, and
> your func is without errors,
You can find data from my tables, function and debug table here:
http://www.sendspace.com/file/11x0ur
My query:
select cena_bylinia(`data`,czas,inf_wybier,cz_trwania,linia,tar_asterisk_id) as x1,
cena_bylinia(`data`,czas,inf_wybier,cz_trwania,linia,tar_asterisk_id) as x2,
cena_bylinia(`data`,czas,inf_wybier,cz_trwania,linia,tar_asterisk_id) as x3,
tmp1.tar_asterisk_id from tmp1
order by tar_asterisk_id asc;
Have a look at query: first three columns have my function with the same parameters. Result set return diffrent values for the same parameters!
>
> so "should return non null results" is
> meaningless. You have to insert enough debugging
> stubs to identify where the results turn null, is
> all.
My _debug function records all function call parameters and results in _debug_table. I see that select inside my function return diffrent results (from time to time it returns no results). And I don't know why..
Is it a bug inside server or my mistake?
If I do the same select outside function - results are ok.
thanks for your help
g.