Skip to content
Snippets Groups Projects
Commit 37df07e8 authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Christian Kuhn
Browse files

[TASK] Functional tests: Enable MySQL strict mode / data validation

Enable SQL mode options that force MySQL to be more strict and not
allow legacy defaults which truncate data, accept invalidate dates
or silently change values on INSERT/UPDATE.

STRICT_ALL_TABLES: Strict SQL mode for all tables, reject invalid data
ERROR_FOR_DIVISION_BY_ZERO: Division by zero produces an error
NO_AUTO_VALUE_ON_ZERO: Only NULL generates the next auto_incroment number
NO_ENGINE_SUBSTITUTION: No automatic substitution of unavailable engines
NO_ZERO_DATE: Don't treat '0000-00-00' as a valid date
NO_ZERO_IN_DATE: Dates with zero parts are not permitted
ONLY_FULL_GROUP_BY: Deny invalid use of aggregation functions

Resolves: #69484
Releases: master
Change-Id: Ife3755b56339a479d86c5535a301ebef1563ace8
Reviewed-on: http://review.typo3.org/42986


Reviewed-by: default avatarStephan Großberndt <stephan@grossberndt.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent bb606441
Branches
Tags
No related merge requests found
......@@ -4,5 +4,6 @@ return array(
'displayErrors' => '1',
'debugExceptionHandler' => '',
'trustedHostsPattern' => '.*',
'setDBinit' => 'SET SESSION sql_mode = \'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY\';',
)
);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment