[TYPO3-dev] DBAL suggesion
marcel.gsteiger at milprog.ch
marcel.gsteiger at milprog.ch
Sun Jan 29 00:37:38 CET 2006
Hi all
I have posted the following suggestion on the users list, but probably
dev would be more appropriate:
I installed typo3 4.0b1 on PostgreSQL from scratch using DBAL, then
updated to 4.0b2. However, I then had numerous troubles with extensions
incompatible with DBAL, so I decided to leave the base system in MySQL
and just use PostgreSQL for tables in my own extensions. The troubles
were so prevalent that I felt it does not make sense to report them,
obviously people are using too much MySQL specific syntax.
Now I tried to activate DBAL with the base system, just installing the
"_DEFAULT" handler on "native" through DBAL/ADODB. When I activate the
DBAL debugger, I get lots of error messages about SQL statements
inserting data into cache_hash, cache_pagesection and cache_pages.
Obviously the system generates INSERT statements that specify null
values for some columns.
To my understanding, inserting NULL in a single value based INSERT
statement is nonsense anyway. Perhaps the programmer was meaning to
insert DEFAULT for that column (SQL standard). Unfortunately MySQL does
support this syntax only starting with version 4.0.3.
I suggest that we assume that no installation using the DBAL will use an
older MySQL database version than 4.0.3 . In this case, the DBAL could
rewrite the insertion of null by the insertion of DEFAULT, e.g.
INSERT INTO cache_hash( hash, content, ident, tstamp) VALUES
('...', DEFAULT, '...', '...')
Of course, the cleanest way would be to get rid of all those MySQL
non-SQL-standard functions...
Regards
--Marcel
More information about the TYPO3-dev
mailing list