You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the content of first 10 rows in my RDB$FIELDS table, select only field "rdb$field_name":
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from null rows 10;
summary: wrong result of WHERE predicat when it contains NULL IS NOT DISTINCT FROM (select min(NULL) from ...) => Wrong result of WHERE predicate when it contains NULL IS NOT DISTINCT FROM (select min(NULL) from ...)
Submitted by: @pavel-zotov
Is related to QA596
LI-T3.0.0.30967 Firebird 3.0 Alpha 2
This is the content of first 10 rows in my RDB$FIELDS table, select only field "rdb$field_name":
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from null rows 10;
RDB$FIELD_NAME
RDB$VIEW_CONTEXT
RDB$CONTEXT_NAME
RDB$DESCRIPTION
RDB$EDIT_STRING
RDB$FIELD_ID
RDB$FIELD_NAME
RDB$SYSTEM_FLAG
RDB$SYSTEM_NULLFLAG
RDB$INDEX_ID
RDB$INDEX_NAME
When I try to add the following WHERE condition result becames wrong, no matter of what table is inside subquery that aggregates MIN(null):
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from (select min(null) from rdb$fields) rows 10;
RDB$FIELD_NAME
RDB$VIEW_CONTEXT
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from (select min(null) from rdb$types) rows 10;
RDB$FIELD_NAME
RDB$VIEW_CONTEXT
PS. Compare with LI-V2.5.3.26744 Firebird 2.5: both variants select 10 rows, which is OK:
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from null rows 10;
RDB$FIELD_NAME
RDB$VIEW_CONTEXT
RDB$CONTEXT_NAME
RDB$DESCRIPTION
RDB$EDIT_STRING
RDB$FIELD_ID
RDB$FIELD_NAME
RDB$SYSTEM_FLAG
RDB$INDEX_ID
RDB$INDEX_NAME
RDB$FIELD_LENGTH
SQL> select rdb$field_name from rdb$fields where null is NOT distinct from (select min(null) from rdb$fields) rows 10;
RDB$FIELD_NAME
RDB$VIEW_CONTEXT
RDB$CONTEXT_NAME
RDB$DESCRIPTION
RDB$EDIT_STRING
RDB$FIELD_ID
RDB$FIELD_NAME
RDB$SYSTEM_FLAG
RDB$INDEX_ID
RDB$INDEX_NAME
RDB$FIELD_LENGTH
Commits: c0361bc FirebirdSQL/fbt-repository@89836a0
The text was updated successfully, but these errors were encountered: