diff --git a/tests/fullstack-test-dt/expr/compare_null.test b/tests/fullstack-test-dt/expr/compare_null.test index 14e16caa5b2..43523fdf1d5 100644 --- a/tests/fullstack-test-dt/expr/compare_null.test +++ b/tests/fullstack-test-dt/expr/compare_null.test @@ -15,7 +15,7 @@ # Must enable DT rough set filter and open debug level log to run this test, otherwise disable this test mysql> drop table if exists test.t; -mysql> create table test.t (a datetime); +mysql> create table test.t (a date); mysql> insert into test.t values("2024-08-26"),("2024-08-25"),("2024-08-24"),("2024-08-23"); @@ -28,22 +28,22 @@ mysql> alter table test.t compact tiflash replica; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a between NULL and '2024-08-25'; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where not (a between NULL and '2024-08-25'); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL); mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL); mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL, "2024-08-26"); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL, "2024-08-26"); @@ -53,7 +53,7 @@ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t w mysql> drop table if exists test.t; -mysql> create table test.t (a datetime); +mysql> create table test.t (a date); mysql> insert into test.t values("2024-08-26"),("2024-08-26"),("2024-08-26"),("2024-08-26"); @@ -64,14 +64,14 @@ func> wait_table test t mysql> alter table test.t compact tiflash replica; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL, "2024-08-26"); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | +| 2024-08-26 | +| 2024-08-26 | +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL, "2024-08-26"); @@ -79,7 +79,7 @@ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t w mysql> drop table if exists test.t; -mysql> create table test.t (a datetime not null); +mysql> create table test.t (a date not null); mysql> insert into test.t values("2024-08-26"),("2024-08-25"),("2024-08-24"),("2024-08-23"); @@ -92,22 +92,22 @@ mysql> alter table test.t compact tiflash replica; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a between NULL and '2024-08-25'; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where not (a between NULL and '2024-08-25'); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL); mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL); mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL, "2024-08-26"); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL, "2024-08-26"); @@ -117,7 +117,7 @@ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t w mysql> drop table if exists test.t; -mysql> create table test.t (a datetime not null); +mysql> create table test.t (a date not null); mysql> insert into test.t values("2024-08-26"),("2024-08-26"),("2024-08-26"),("2024-08-26"); @@ -128,13 +128,13 @@ func> wait_table test t mysql> alter table test.t compact tiflash replica; mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a in (NULL, "2024-08-26"); -+---------------------+ -| a | -+---------------------+ -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -| 2024-08-26 00:00:00 | -+---------------------+ ++------------+ +| a | ++------------+ +| 2024-08-26 | +| 2024-08-26 | +| 2024-08-26 | +| 2024-08-26 | ++------------+ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where a not in (NULL, "2024-08-26"); \ No newline at end of file