Project

General

Profile

Actions

Bug #85329

closed

Functional tests are broken on sql_mode STRICT_TRANS_TABLES

Added by Tymoteusz Motylewski almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-06-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

change in:
https://review.typo3.org/#/c/57141/

changed some columns from double to tinytext.
The problem is that mysql doesn't accept default value for text columns.

This in combination with

sql_mode = STRICT_TRANS_TABLES

result in error when you try to run functinal tests.
1) TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest::changeParentContentSorting
SQL Error for table "tx_irretutorial_1nff_price": 
An exception occurred while executing 'INSERT INTO `tx_irretutorial_1nff_price` (`uid`, `pid`, `sorting`, `deleted`, `sys_language_uid`, `l18n_parent`, `l18n_diffsource`, `t3ver_wsid`, `t3ver_state`, `t3ver_stage`, `t3ver_oid`, `t3ver_move_id`, `title`, `parentid`, `parenttable`, `parentidentifier`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["7", "89", "1", "0", "0", "0", "", "0", "0", "0", "0", "0", "Price #1.1.1", "5", "tx_irretutorial_1nff_offer", ""]:

Field 'price' doesn't have a default value


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #85178: Align impexp functional export tests between db enginesClosed2018-06-07

Actions
Actions #1

Updated by Tymoteusz Motylewski almost 6 years ago

  • Related to Task #85178: Align impexp functional export tests between db engines added
Actions #2

Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57286

Actions #3

Updated by Tymoteusz Motylewski almost 6 years ago

How to test it:
set mysql setting in my.cnf:

sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION


This is the default fro mysql 5.7
run some functional test, like:
typo3DatabaseName='t37_core_test' typo3DatabaseHost='localhost' typo3DatabaseUsername='user' typo3DatabasePassword='password' bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php --filter changeParentContentSorting

without a patch you should see an error:

1) TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest::changeParentContentSorting
SQL Error for table "tx_irretutorial_1nff_price": 
An exception occurred while executing 'INSERT INTO `tx_irretutorial_1nff_price` (`uid`, `pid`, `sorting`, `deleted`, `sys_language_uid`, `l18n_parent`, `l18n_diffsource`, `t3ver_wsid`, `t3ver_state`, `t3ver_stage`, `t3ver_oid`, `t3ver_move_id`, `title`, `parentid`, `parenttable`, `parentidentifier`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["7", "89", "1", "0", "0", "0", "", "0", "0", "0", "0", "0", "Price #1.1.1", "5", "tx_irretutorial_1nff_offer", ""]:

Field 'price' doesn't have a default value

Actions #4

Updated by Georg Ringer almost 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #5

Updated by Tymoteusz Motylewski almost 6 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF