Bug #3371 prepared statement select produces wrong results when parameter value is NULL
Submitted: 2 Apr 2004 10:26 Modified: 12 Apr 2004 13:02
Reporter: Sergey Petrunya Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1-bk OS:
Assigned to: Assigned Account CPU Architecture:Any

[2 Apr 2004 10:26] Sergey Petrunya
Description:
Handling of NULL values as Prepared Statement parameters is broken. 

How to repeat:
Create the test table:

create table t ( a int);
insert into t values (1), (2), (NULL);

prepare statement "select a from t where a <=> ?"

execute it with integer NULL as parameter and get get all rows as result.
[12 Apr 2004 13:02] Sergey Petrunya
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

The effect is caused by the same problem as in BUG#3367.