Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
Not 5.7.x, 8.0.23-14 (Q1 2021)
-
None
Description
How to Repeat
1. Load attached dump
2. Run queries:
mysql> select f1, f8, f2, f3 from t1 where f2 >='0001-01-01T00:00:00' and f3 in ('scheduled') and f2 <'2021-05-19T15:04:43.270583849' and f1 = '63bab075-1f5c-4899-b5c8-a1bbf7833aea'; +--------------------------------------+------------------+----------------------------+-----------+ | f1 | f8 | f2 | f3 | +--------------------------------------+------------------+----------------------------+-----------+ | 63bab075-1f5c-4899-b5c8-a1bbf7833aea | 4�Ϯ^�C�����e�� | 2021-05-19 20:00:00.000000 | scheduled | +--------------------------------------+------------------+----------------------------+-----------+ 1 row in set (0.00 sec) mysql> select * from t1 where f2 >='0001-01-01T00:00:00' and f3 in ('scheduled') and f2 <'2021-05-19T15:04:43.270583849' and f1 = '63bab075-1f5c-4899-b5c8-a1bbf7833aea'; Empty set (0.00 sec)
3. Notice that exact same WHERE condition produces different results depending if you requested just a few columns or everything.
Suggested fix
Return rows no matter if a user asks for everything or just for a few columns.