[TYPO3-core] RFC: Fix FE user login for DBAL
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Wed Jun 28 10:57:33 CEST 2006
Dmitry Dulepov schrieb:
> Hi!
>
> Martin Kutschker wrote:
>
>> But the real issue is that I cannot insert/update '' on a NOT NULL
>> column in Oracle. *sigh* So NOT NULL and DEFAULT '' don't work together.
>
>
> What I can say? Only the "F***king Oracle!" :(
>
> But '' is very good default value. We cannot remove NOT NULL just
> because Oracle treats empty string is null. If we do it, we will allow
> NULL values in many columns and many queries will break. Result of
> comparison is undefined if column has null as value. Thus = and <> will
> be both true for this column. This is even worse!
>
> I suppose DBAL could remove NOT NULL only for Oracle, not for other
> (normal) databases.
I have thought of that too.
Standard behaviour on install:
If a column is NOT NULL, but has no DEFAULT provide a default DEFAULT of ''
[text] and 0 [numbers]).
Special behaviour for Oracle:
If a column is NOT NULL, but has a DEFAULT of '' remove the NOT NULL.
But I think we should try to avoid the possibilty of NULLs in the DB on te
DB level. TYPO3 doesn't insert NULLs, but is sloppy so we must not have
columns without a DEFAULT if we don't want to run into the NULL comparison
problem.
Masi
More information about the TYPO3-team-core
mailing list