mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #792 combination of date-interval and between with mixed constant and non-constant
This commit is contained in:
@@ -32,6 +32,8 @@ datum
|
||||
2000-01-02
|
||||
2000-01-03
|
||||
2000-01-04
|
||||
SELECT * FROM t1 WHERE datum BETWEEN "2000-1-2" AND datum - INTERVAL 100 DAY;
|
||||
datum
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
user_id char(10),
|
||||
|
||||
@@ -34,6 +34,7 @@ INSERT INTO t1 VALUES ( "2000-1-3" );
|
||||
INSERT INTO t1 VALUES ( "2000-1-4" );
|
||||
INSERT INTO t1 VALUES ( "2000-1-5" );
|
||||
SELECT * FROM t1 WHERE datum BETWEEN "2000-1-2" AND "2000-1-4";
|
||||
SELECT * FROM t1 WHERE datum BETWEEN "2000-1-2" AND datum - INTERVAL 100 DAY;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user