On Fri, June 15, 2007 16:29, Ben Clewett wrote:
> Dear MySql,
>
> I have noticed a change in behaviour in MySql 5.0.41 from 5.0.26 with
> date comparisons.
>
> In 5.0.26:        '2007-06-15' = '2007-06-15 00:00:00' is True.
> In 5.0.41:        '2007-06-15' = '2007-06-15 00:00:00' is False.
> In 5.1.6-alpha:   '2007-06-15' = '2007-06-15 00:00:00' is True.

On my servers:

5.0.21-log          '2007-06-15' = '2007-06-15 00:00:00' is False.
5.1.17-beta-log     '2007-06-15' = '2007-06-15 00:00:00' is False.

But on 5.0.21

SELECT COUNT(*) FROM t WHERE d = '2007-06-15 00:00:00'; = 1
SELECT COUNT(*) FROM t WHERE d = '2007-06-15';          = 1

and on 5.1.17

SELECT COUNT(*) FROM t WHERE d = '2007-06-15 00:00:00'; = 0
SELECT COUNT(*) FROM t WHERE d = '2007-06-15';          = 1

How does that make sense ???

> This has caused us a few problems.  Is this the way things should be,
> because this change does not seem right?
>
> I am also very worried that this behaviour revert when we role out 5.1?
>
> Does any member know whether this is a bug, or just an anoying feature?
>
> Regards,
>
> Ben
>
>
> To Replicate:
>
> CREATE TABLE t (d DATE);
> INSERT INTO t VALUES ('2007-06-15');
> SELECT COUNT(*) FROM t WHERE d = '2007-06-15 00:00:00';
> +----------+
> | COUNT(*) |
> +----------+
> |        0 |
> +----------+
> SELECT COUNT(*) FROM t WHERE d = '2007-06-15';
> +----------+
> | COUNT(*) |
> +----------+
> |        1 |
> +----------+
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to