Subject Re: [firebird-support] Re: Incorrect handling of null within view
Author Claudio Valderrama C.
""Adam"" <s3057043@...> wrote in message
news:<ea8uo7+src@...>...
>
> 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:
> http://tracker.firebirdsql.org/browse/CORE-871

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:
http://firebird.cvs.sourceforge.net/firebird/firebird2/src/dsql/metd.epp?r1=
1.15&r2=1.16
The changed code even contains his initials, but the commit's comment only
says
"Changed struct fld and FLD to local module names"

Dmitry, you and Arno are redeemed.
:-)

C.