Arturs Aboltins writes:
> From: [EMAIL PROTECTED]
> To:   [EMAIL PROTECTED]
> Subject: MYSQL bug with if and datetime fields
> 
> >Description:
>       In queries where datetime field is in "WHERE" condition, the same
> field
>       in "IF" statement causes incorrect query result.
> >How-To-Repeat:
> #---------------------------------------------------------------------------
> ---------------------------------------------
>   mysql> select * from test ;
>   +------+---------------------+
>   | id   | dt                  |
>   +------+---------------------+
>   |    1 | 2001-08-14 00:00:00 |
>   |    2 | 2001-08-15 00:00:00 |
>   |    3 | 2001-08-16 00:00:00 |
>   +------+---------------------+
>   3 rows in set (0.00 sec)
>  
>   mysql> select * from test where dt='2001-08-14 00:00:00' and dt =
> if(id=1,'2001-08-14 00:00:00','1999-08-15');
>   Empty set (0.95 sec)
>  

Please try the above with 3.23.41. I think that it was fixed
meanwhile. 
 

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to