Bug #18866

Epic #68397: Make TYPO3 work with MySQL strict mode

Cannot create page with Mysl in strict mode (STRICT_TRANS_TABLES)

Added by Martin Kutschker about 7 years ago. Updated 14 days ago.

Status:Rejected Start date:2008-05-28
Priority:Should have Due date:
Assigned To:Alexander Opitz % Done:

0%

Category:- Spent time: -
Target version:-
TYPO3 Version:4.2 Is Regression:No
PHP Version:5.2 Sprint Focus:
Complexity:

Description

When I want to create a page I get an Mysql error saying that it has an inavlid value for an integer field. The problem is that "storage_pid" is when not set initially an empty string. It seems that I get only default values in strict mode for NULL, but no type conversion from empty string to 0 occurs.

A possible solution would be to use 0 as TCA default, but I think it is more proper to make the conversion in TCEmain if necessary.

(issue imported from #M8542)

bug_8542.diff Magnifier (1.2 kB) Administrator Admin, 2008-05-28 17:16


Related issues

related to Core - Bug #52596: Creating pages tries to assign empty string to integer field Resolved 2013-10-07
related to Core - Bug #52204: SQL error: Incorrect integer value: '' for column 'backen... Rejected 2013-09-24
related to Core - Task #54883: Document that TYPO3 CMS is not compatible with MySQL stri... Resolved 2014-01-09
related to Core - Bug #52206: Default-values for text-fields Resolved 2013-09-24
duplicates Core - Bug #20052: SQL error: 'Incorrect integer value: '' for column 'stora... Rejected 2009-02-19

Associated revisions

Revision bad3f24c
Added by Sascha Egerer almost 2 years ago

[BUGFIX] Check for incompatible SQL modes

If the SQL mode "STRICT_ALL_TABLES" is enabled you
will not be able to save most records. (Enable it in
your my.cnf and try to save a tt_content record)

This patch adds a check in the install tool for the
incompatible SQL modes "STRICT_ALL_TABLES" and
"NO_BACKSLASH_ESCAPES".

The automatic fix for "NO_BACKSLASH_ESCAPES" has been
removed because we don't want to change the mysql
environment automatically.

Resolves: #20052
Resolves: #18866
Resolves: #18821
Releases: 6.2, 6.1, 6.0
Change-Id: Ifd2d7901935f06534a273374bf48266916e23698
Reviewed-on: https://review.typo3.org/19671
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Markus Klein
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision e727d5ff
Added by Sascha Egerer almost 2 years ago

[BUGFIX] Check for incompatible SQL modes

If the SQL mode "STRICT_ALL_TABLES" is enabled you
will not be able to save most records. (Enable it in
your my.cnf and try to save a tt_content record)

This patch adds a check in the install tool for the
incompatible SQL modes "STRICT_ALL_TABLES" and
"NO_BACKSLASH_ESCAPES".

The automatic fix for "NO_BACKSLASH_ESCAPES" has been
removed because we don't want to change the mysql
environment automatically.

Resolves: #20052
Resolves: #18866
Resolves: #18821
Releases: 6.2, 6.1, 6.0
Change-Id: Ifd2d7901935f06534a273374bf48266916e23698
Reviewed-on: https://review.typo3.org/23237
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#1 Updated by Johannes about 7 years ago

confirming this bug. seems to be related with 0004693

#2 Updated by Martin Kutschker about 7 years ago

No, the definition of "storage_pid" has not been changed.

#3 Updated by Johannes about 7 years ago

yes of course. my comment was missleading.I mean: both bug come from mysql-5 strictmode and could alternatively (at least for me) be solved by changing sql-mode to MYSQL40 in my.ini.

#4 Updated by Rene van Asperen almost 7 years ago

The attached diff file seems to fix the problem. Can you give me some feedback about it?

#5 Updated by Marcos Fadul almost 7 years ago

The diff file fix the problem for me too.
Good work.

#6 Updated by Gerrit Code Review over 2 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

#7 Updated by Gerrit Code Review over 2 years ago

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

#8 Updated by Gerrit Code Review over 2 years ago

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

#9 Updated by Alexander Opitz about 2 years ago

  • Assigned To set to Alexander Opitz
  • Target version deleted (0)

#10 Updated by Gerrit Code Review about 2 years ago

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

#11 Updated by Gerrit Code Review about 2 years ago

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

#12 Updated by Gerrit Code Review almost 2 years ago

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

#13 Updated by Gerrit Code Review almost 2 years ago

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

#14 Updated by Gerrit Code Review almost 2 years ago

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

#15 Updated by Gerrit Code Review almost 2 years ago

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

#16 Updated by Gerrit Code Review almost 2 years ago

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

#17 Updated by Gerrit Code Review almost 2 years ago

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

#18 Updated by Gerrit Code Review almost 2 years ago

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

#19 Updated by Anonymous almost 2 years ago

  • Status changed from Under Review to Resolved

#20 Updated by Gerrit Code Review almost 2 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

#21 Updated by Stefan Neufeind almost 2 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.

#22 Updated by Anonymous almost 2 years ago

  • Status changed from Under Review to Resolved

#23 Updated by Chris topher almost 2 years ago

  • Status changed from Resolved to New

#24 Updated by Mathias Schreiber 7 months ago

  • Status changed from New to Rejected

Making TYPO3 work with script mode is at least a year of work.
We have this on our agenda, but since this touches a wider aspect of the code I'm closing these tickets down.

#25 Updated by Morton Jonuschat 14 days ago

  • Parent task set to #68397
  • Is Regression set to No

Also available in: Atom PDF