DATETIME and DATE Types Not Comparable is not compatible with MySQL
Bug #972447 reported by
Padraig O'Sullivan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban SQL Parser |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
server revision: 1.1.0
DATETIME and DATE types are not comparable in the Akiban Server. This is not compatible with MySQL behavior.
An easy test case to demonstrate this:
mysql> create table t1 (id int primary key, a_date datetime not null) engine=akibandb;
Query OK, 0 rows affected (0.28 sec)
mysql> mysql> select * from t1 where a_date > current_date - interval 1 day;
Empty set (0.09 sec)
mysql>
Executing the same query in akiban:
test=> select * from t1 where a_date > current_date - interval 1 day;
ERROR: Types not comparable: DATETIME and DATE
test=>
This in particular affects one of our design partners.
affects: | akiban-server → akiban-sql-parser |
tags: | added: customerbug |
Changed in akiban-sql-parser: | |
status: | New → Fix Released |
information type: | Private → Public |
To post a comment you must log in.
The workaround we have been doing at the moment is to use the now() function:
test=> select * from t1 where a_date > now() - interval 1 day;
id | a_date
----+--------
(0 rows)
test=>
As part of resolving this bug, it would be nice to know which functions are not MySQL compatible if possible