Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.11, 1.1.1
-
None
-
None
-
2017-23, 2017-24
Description
An always-true WHERE condition added to a query with at least 2 normal WHERE conditions generates more results. Essentially removing the first WHERE condition.
Example with partsupp table:
select ps_partkey, ps_suppkey from partsupp where ps_availqty<4093 and ps_supplycost < 500; |
...
|
163216 rows in set (0.73 sec) |
 |
select ps_partkey, ps_suppkey from partsupp where ps_availqty<4093 and ps_supplycost < 500 and (TRUE OR FALSE); |
...
|
563399 rows in set (2.00 sec) |
This happens with:
AND (1=1 OR 0=0) |
AND (TRUE OR FALSE) |
AND ('test' = 'test' OR 'test' = 'aaa') |