From: Dimitry S. (JIRA) <tr...@fi...> - 2011-02-21 10:58:12
|
Wrong comparsion of DATE and TIMESTAMP if index is used ------------------------------------------------------- Key: CORE-3355 URL: http://tracker.firebirdsql.org/browse/CORE-3355 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.5.0, 2.0.6, 3.0 Initial, 2.1.3 Environment: Any Reporter: Dimitry Sibiryakov Folowing script gives result 1 and 4 while it should be 1 and 5: create table tdate (id integer not null primary key, val date); create index tdateix1 on tdate (val); commit; insert into tdate values (0, '1997-12-31'); insert into tdate values (1, '1998-01-01'); insert into tdate values (2, '1998-01-02'); insert into tdate values (3, '1998-01-03'); insert into tdate values (4, '1998-01-04'); insert into tdate values (5, '1998-01-05'); commit; select count(*) from tdate where val >= timestamp'1998-01-04 12:00:00.0000'; select count(*) from tdate where val < timestamp'1998-01-04 12:00:00.0000'; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |