Project

General

Profile

Actions

Bug #16809

closed

FIX FOR Typo3 basic tables definition not compliant with MySQL 5.0 strict mode enabled by default

Added by Alban Cousinie over 17 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Must have
Category:
Install Tool
Target version:
-
Start date:
2006-12-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

tables.sql (10.1 KB) tables.sql Administrator Admin, 2006-12-22 15:26
4693.diff (19.7 KB) 4693.diff Administrator Admin, 2008-05-12 14:55

Related issues 6 (0 open6 closed)

Related to TYPO3 Core - Bug #15675: Backend Login ProblemClosedKarsten Dambekalns2006-02-19

Actions
Related to TYPO3 Core - Bug #15295: Unable to login into BE when using MySQL 5+ClosedKarsten Dambekalns2005-12-19

Actions
Related to TYPO3 Core - Bug #19923: Table definition in cache_treelist not compliant with MySQL 5.0 strict modeClosedBenni Mack2009-01-27

Actions
Related to TYPO3 Core - Bug #52206: Default-values for text-fieldsClosed2013-09-24

Actions
Has duplicate TYPO3 Core - Bug #16807: create admin user fails because of bad be_users table definitionClosedMichael Stucki2006-12-22

Actions
Has duplicate TYPO3 Core - Bug #16765: Warn about MySQL 5 while installing.ClosedMichael Stucki2006-12-07

Actions
Actions

Also available in: Atom PDF