Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
SET @@timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP); |
INSERT INTO t1 VALUES ('2001-01-01 00:00:00','2001-01-01 23:59:59'); |
SELECT * FROM t1 WHERE TIME'10:20:30' BETWEEN a and b; |
erroneously returns empty set.
If I change one of the columns from TIMESTAMP to DATETIME it correctly returns one row:
SET @@timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a TIMESTAMP,b DATETIME); |
INSERT INTO t1 VALUES ('2001-01-01 00:00:00','2001-01-01 23:59:59'); |
SELECT * FROM t1 WHERE TIME'10:20:30' BETWEEN a and b; |
+---------------------+---------------------+
|
| a | b |
|
+---------------------+---------------------+
|
| 2001-01-01 00:00:00 | 2001-01-01 23:59:59 |
|
+---------------------+---------------------+
|
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed