sql: fix fk set null clause
After changing behavior of the `IS` operator (#b3a3ddb5), `SET NULL` was rewritten to use `EQ` instead. Which doesn't respect NULLs. This commit fixes the null related behavior by emitting logical constructions equivalent for this case to old `IS`. The new expression works differently than old `IS` for nulls, however the difference doesn't change anything, because matched rows are then searched in a child table with `EQ` expression which do not match nulls. Before: `oldval` old_is `newval` Now: `oldval` is_null or (`newval` is_not_null and `oldval` eq `newval`) Closes #3645
Loading
Please register or sign in to comment