create table t (a int, b datetime, c varchar(255)) partition by range columns (a,b,c)(partition p1 values less than (-2147483648,'0000-00-00',""),partition p2 values less than (10,'2022-01-01',"Wow"),partition p3 values less than (11,'2022-01-01',MAXVALUE),partition p4 values less than (MAXVALUE,'2022-01-01',"Wow"));
set @@sql_mode = '';
insert into t values (-2147483648,'0000-00-00',null);
insert into t values (-2147483648,'0000-00-00',"");
--sorted_result
select * from t where a < 2;
The result is unstable even with --sorted_result, caused by a bug.
For NULL and empty string "", we compare them using bytes.Compare() and get result 0, that's incorrect.
The result is unstable even with
--sorted_result
, caused by a bug.For NULL and empty string "", we compare them using
bytes.Compare()
and get result 0, that's incorrect.