Closed greenlion closed 3 years ago
Fixed in enhanced_ecp branch
mysql> explain analyze select count(*) from t2 where c2 > 'a'; +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | -> Aggregate: count(0) (actual time=0.248..0.248 rows=1 loops=1) -> Filter: (t2.c2 > 'a') (cost=0.46 rows=1) (actual time=0.247..0.247 rows=1 loops=1) -> Table scan on t2 (cost=0.46 rows=4) (actual time=0.243..0.245 rows=4 loops=1) |
---|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.02 sec)
mysql> explain analyze select count(*) from t2 where c2 = 'a'; +----------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +----------------------------------------------------------------------------------------------------------------------------------------------------------+ | -> Aggregate: count(0) (actual time=1.357..1.357 rows=1 loops=1) -> Table scan on t2 (cost=0.46 rows=4) (actual time=1.345..1.352 rows=3 loops=1) |
---|
+----------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.02 sec)
where textcol < 1 can not be evaluated by Fastbit and returns wrong results. Comparisons between strings and integers need to be handled at the MySQL layer.