Bug #16809
closedFIX FOR Typo3 basic tables definition not compliant with MySQL 5.0 strict mode enabled by default
0%
Description
This relates to issues 0004691, 0002634 and 0002059
Issue occurs with MySQL 5.0 databases.
The reason for this issue occurring is :
Some fields in the table definitions are marked as NOT NULL while not providing any default values. When a Typo3 MySQL query does not specify a value for one of those fields, the query fails.
Also since MySQL 5.0, BLOB and TEXT columns cannot be assigned a default value ( but are set as NOT NULL in Typo3 basic table definition).
I have edited the tables.sql file used by typo3 to create a basic database during a fresh install and fixed these issues. It resolves issues 0004691, 0002634 and 0002059.
THIS FIX SHOULD BE APPLIED TO TYPO3 4.0/4.1 MAIN DEVELOPMENT TRUNK QUICKLY since more and more users are using MySQL 5.0 and they should be facing this problem.
Overwrite t3lib/stddb/tables.sql with the tables.sql file supplied in this issue report.
This update has been tested and can not break Typo3 since all it does is remove a few NOT NULL statements in fields definitions where they do not comply with MySQL Strict mode.
An alternate fix to these issues is to edit the MySQL configuration file (my.ini on windows, my.cnf on linux) and change the line :
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to :
sql-mode="MYSQL40"
Then restart MySQL.
But since the bad SQL mode for Typo3 is specified by default into MySQL 5.0, Typo3 should adapt in order to comply and avoid having all newbies blocked in the install tool while facing this bug. Thus this patch has to be included into the main development trunk.
(issue imported from #M4693)
Files