Subject Re: [firebird-support] Re: Incorrect handling of null within view
Author Claudio Valderrama C.
""Adam"" <s3057043@...> wrote in message
> Yeah, that happens to all of us at some stage. Resolved bugs that are
> reintroduced somewhere.
> I think the rule is that any field involved on the right side of a
> left join, any field involved on the left side of a right join, and
> any field involved on either side of an outer join must be nullable. I
> don't know enough as to whether the engine has this information at the
> time it is needed. I also don't know whether simply telling it that
> any field is nullable will have other unintended consequences.
> If anyone is interested, the issue is in the tracker:

This is easy to say but not that easy to do.
Also, DSQL's cache (METD) is too dumb to try to put that logic here.
Furthermore, you can use NULL as a literal, so why bother. This information
is available to the core engine's cache, so when METD disappears, we can
fine tune it. For now, I will reapply. It means that any view's field is
potentially nullable. This is correct, because when you update a view, the
underlying trigger and the tables touched by that trigger determine really
what you can do (store NULL, for example).

BTW, apologies for naming the wrong people. After four years, it's hard to
remember exactly who did what, but I prefer to clarify. The change was made
by hippoman (aka Ignacio Ortega), a developer that did some tweaks and
became inactive long time ago:
The changed code even contains his initials, but the commit's comment only
"Changed struct fld and FLD to local module names"

Dmitry, you and Arno are redeemed.