DB2 - Problem description
Problem IT35060 | Status: Closed |
BOOLEAN PREDICATES RETURN WRONG RESULT WITH NULL INPUT | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
The boolean predicates (IS TRUE, IS NOT FALSE etc.) are returning a NULL result with NULL input. Boolean predicates should never return a NULL result. When used in a where-clause, the problem may not be noticeable since a NULL (UNKNOWN) result in a where-clause returns 0 rows. However, the problem is apparent if the boolean predicate is preceded with NOT in the where-clause: create table T (B boolean) DB20000I The SQL command completed successfully. insert into T values (NULL) DB20000I The SQL command completed successfully. select * from T where not(B is false) B ------ | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.5.0 * **************************************************************** | |
Local Fix: | |
Use the corresponding built-in functions instead: SYSIBM.ISTRUE, SYSIBM.ISNOTTRUE etc. | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.5.0 * **************************************************************** | |
Comment | |
First fixed in Db2 version 11.5.5.0 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 25.11.2020 05.11.2021 05.11.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |