Project

General

Profile

Actions

Bug #18821

closed

Epic #68397: Make TYPO3 work with MySQL strict mode

Installer will not create any be_users if unsupported sql_mode is used

Added by Phil almost 16 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Category:
Install Tool
Target version:
-
Start date:
2008-05-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Insert statement fails due to 'NOT NULL' DEFUALT NULL column descriptions.

Field 'TSconfig' doesn't have a default value

i presume its the same for column uc. turning on SQL debug i got the SQL statement and ran in in mysql command line as follows:

mysql> INSERT INTO be_users
-> (
-> username,
-> password,
-> admin,
-> uc,
-> fileoper_perms,
-> tstamp,
-> crdate
-> ) VALUES (
-> 'admin',
-> '5f4dcc3b5aa765d61d8327deb882cf99',
-> '1',
-> '',
-> '7',
-> '1211301857',
-> '1211301857'
-> );
ERROR 1364 (HY000): Field 'TSconfig' doesn't have a default value

windows vista
mysql: 5.1.24-rc-community
php 5.2.4
Apache/2.2.4
(issue imported from #M8474)


Related issues 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Task #54883: Document that TYPO3 CMS is not compatible with MySQL strict modesClosedErnesto Baschny2014-01-09

Actions
Actions #1

Updated by Norbert Bernhardt over 15 years ago

This happens on a regular basis when MySQL's sql_mode is set to STRICT_ALL_TABLES.

The MySQL manual states for this mode:
Enable strict mode for all storage engines. Invalid data values are rejected. Additional detail follows. (Added in MySQL 5.0.2)

There are no default values for text and blob fields in Typo3 as far as I overlooked it. I had the problem with be_sessions and fe_sessions having no default value for ses_data. In this case Typo3 tries to insert values for ses_id, ses_name, ses_iplock, ses_hashlock, ses_userid, ses_tstamp and MySQL throws error
#14916 - Field 'ses_data' doesn't have a default value

The solution would be to define the value
NULL
to each text and blob field in the Typo3 database to make it strictly SQL compliant.

Actions #2

Updated by Norbert Bernhardt over 15 years ago

Seems the problem of non-strict-conformity exists also in Typo3 code. Trying to insert a new content entry in tt_content fails with:

2: SQL error: 'Incorrect integer value: '' for column 'sys_language_uid' at row 1' (tt_content:NEW4903a79adce61)

tt_content.sys_language_uid is a integer number, trying to insert '' as an empty string doesn't seem very SQL-compliant.

@ Typo3 Core Team: Any plans to change that? Help appreciated?

Actions #4

Updated by Gerrit Code Review about 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #5

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #6

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #7

Updated by Alexander Opitz almost 11 years ago

  • Assignee set to Alexander Opitz
  • Target version deleted (0)
Actions #8

Updated by Gerrit Code Review almost 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #9

Updated by Gerrit Code Review almost 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #10

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #11

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #12

Updated by Gerrit Code Review over 10 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #13

Updated by Gerrit Code Review over 10 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #14

Updated by Gerrit Code Review over 10 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #15

Updated by Gerrit Code Review over 10 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #16

Updated by Gerrit Code Review over 10 years ago

Patch set 12 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19671

Actions #17

Updated by Anonymous over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #18

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23237

Actions #19

Updated by Stefan Neufeind over 10 years ago

Patch was reverted again since, after some discussion, this was not the right place to add the additional check. Will need a follow-up. The general idea itself however was okay.

Actions #20

Updated by Anonymous over 10 years ago

  • Status changed from Under Review to Resolved
Actions #21

Updated by Alexander Opitz over 10 years ago

  • Status changed from Resolved to New
Actions #22

Updated by Sascha Egerer over 9 years ago

  • Subject changed from installer will not create any be_users to Installer will not create any be_users if unsupported sql_mode is used
  • Status changed from New to Accepted
  • Is Regression set to No

Currently there is not check at all anymore which ends up in a very frustrating experience if somebody doesn't know about the "sql mode" requirements.

Actions #23

Updated by Morton Jonuschat almost 9 years ago

  • Parent task set to #68397
Actions #24

Updated by Morton Jonuschat almost 9 years ago

  • Status changed from Accepted to Closed

Closing this since the field configuration for TSconfig has been fixed a long time ago in TYPO3 4.3 - https://github.com/TYPO3/TYPO3.CMS/commit/a0bbc6fdf9d6541df871ec32ebe95f392712c7c2

The InstallTool check will be tracked in a dedicated issue: #68407

Actions

Also available in: Atom PDF