MySQL doesn't accept non-real dates on stored procedure calls
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mysql-server
Sort of hard to explain. I created a stored procedures where you pass 2 dates, a begindate and enddate. I used >= begindate AND <= enddate. I couldn't figure out why sometimes I was getting unexpected results. Eventually I figured out that "non-real" dates (for example 2008-06-31) causes mysql to return NULL.
What's strange is that IT ACCEPTS the non-real dates in a regular SELECT. But if you stick the exact same SELECT into a Stored Procedure it stops working.
I hope I have been clear enough that you understand. I would consider this to be a bug and not user error since the problem only occurs with stored procedures. Also I ahve check and some other distros don't have this happen.
On Mon, Jul 21, 2008 at 12:08:58AM -0000, Matthew wrote:
> Sort of hard to explain. I created a stored procedures where you pass 2
> dates, a begindate and enddate. I used >= begindate AND <= enddate. I
> couldn't figure out why sometimes I was getting unexpected results.
> Eventually I figured out that "non-real" dates (for example 2008-06-31)
> causes mysql to return NULL.
Could specify the actual code you've used to create the store procedure
?
>
> What's strange is that IT ACCEPTS the non-real dates in a regular
> SELECT. But if you stick the exact same SELECT into a Stored Procedure
> it stops working.
Could you list which sql statement you're using and the outcome you
receive ?
status incomplete
-- www.ubuntu. com
Mathias Gug
Ubuntu Developer http://