Loading mysql-test/r/type_date.result +6 −0 Original line number Diff line number Diff line Loading @@ -104,3 +104,9 @@ SELECT * FROM t1; y 0000 DROP TABLE t1; create table t1(start_date date, end_date date); insert into t1 values ('2000-01-01','2000-01-02'); select 1 from t1 where cast('2000-01-01 12:01:01' as datetime) between start_date and end_date; 1 1 drop table t1; mysql-test/t/type_date.test +7 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,11 @@ INSERT INTO t1 VALUES ('abc'); SELECT * FROM t1; DROP TABLE t1; # # Bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN # create table t1(start_date date, end_date date); insert into t1 values ('2000-01-01','2000-01-02'); select 1 from t1 where cast('2000-01-01 12:01:01' as datetime) between start_date and end_date; drop table t1; # End of 4.1 tests Loading
mysql-test/r/type_date.result +6 −0 Original line number Diff line number Diff line Loading @@ -104,3 +104,9 @@ SELECT * FROM t1; y 0000 DROP TABLE t1; create table t1(start_date date, end_date date); insert into t1 values ('2000-01-01','2000-01-02'); select 1 from t1 where cast('2000-01-01 12:01:01' as datetime) between start_date and end_date; 1 1 drop table t1;
mysql-test/t/type_date.test +7 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,11 @@ INSERT INTO t1 VALUES ('abc'); SELECT * FROM t1; DROP TABLE t1; # # Bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN # create table t1(start_date date, end_date date); insert into t1 values ('2000-01-01','2000-01-02'); select 1 from t1 where cast('2000-01-01 12:01:01' as datetime) between start_date and end_date; drop table t1; # End of 4.1 tests