Hi,
I have a MySQL 5.0.51a production database and a MySQL 5.5.6rc test
database.
The same query produces different results.
Is this a bug or does anybody have an explanation for this behaviour?
CREATE TABLE `ttt_bug` (
`vondat` datetime NOT NULL,
`standort` varchar(3) NOT NULL,
PRIMARY KEY (`vondat`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `ttt_bug` VALUES ('2002-01-15 00:00:00','GRH');
*********
5.0.51a:*
*********
select * from ttt_bug;
+---------------------+----------+
Quote:
vondat | standort |
+---------------------+----------+
2002-01-15 00:00:00 | GRH |
+---------------------+----------+
|
1 row in set (0.00 sec)
Here comes the query and the correct result.
select * from ttt_bug where vondat <= str_to_date('19.11.2010 10:05:14',
'%d.%m.%Y %T');
+---------------------+----------+
Quote:
vondat | standort |
+---------------------+----------+
2002-01-15 00:00:00 | GRH |
+---------------------+----------+
|
1 row in set (0.00 sec)
*********
5.5.6rc:*
*********
select * from ttt_bug;
+---------------------+----------+
Quote:
vondat | standort |
+---------------------+----------+
2002-01-15 00:00:00 | GRH |
+---------------------+----------+
|
1 row in set (0.00 sec)
Here comes the query and the -incorrect- result.
select * from ttt_bug where vondat <= str_to_date('19.11.2010 10:05:14',
'%d.%m.%Y %T');
Empty set (0.00 sec);
Server variables are as same as possible,
kind regards,
Bodo