MySQL Forums
Forum List  »  Stored Procedures

Re: Unpredictable results from stored procedure
Posted by: Grzegorz Laszczak
Date: July 18, 2013 03:37AM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Unpredictable results from stored procedure
1131
July 18, 2013 03:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.