56 'NO_BACKSLASH_ESCAPES'
69 $defaultConnection = GeneralUtility::makeInstance(ConnectionPool::class)
71 if (strpos($defaultConnection->getServerVersion(),
'MySQL') !== 0) {
88 if (!empty($detectedIncompatibleSqlModes)) {
90 'Incompatible SQL modes have been detected:'
91 .
' ' . implode(
', ', $detectedIncompatibleSqlModes) .
'.'
92 .
' The listed modes are not compatible with TYPO3 CMS.'
93 .
' You have to change that setting in your MySQL environment'
94 .
' or in $GLOBALS[\'TYPO3_CONF_VARS\'][\'DB\'][\'Connections\'][\'Default\'][\'initCommands\']',
95 'Incompatible SQL modes found!',
101 'No incompatible SQL modes found.'
113 preg_match(
'/MySQL ((\d+\.)*(\d+\.)*\d+)/', $connection->
getServerVersion(), $match);
114 $currentMysqlVersion = $match[1];
115 if (version_compare($currentMysqlVersion, $this->minimumMySQLVersion,
'<')) {
117 'Your MySQL version ' . $currentMysqlVersion .
' is too old. TYPO3 CMS does not run'
118 .
' with this version. Update to at least MySQL ' . $this->minimumMySQLVersion,
119 'MySQL version too low',
125 'MySQL version is fine'
138 $defaultDatabaseCharset = (string)$queryBuilder->
select(
'DEFAULT_CHARACTER_SET_NAME')
139 ->
from(
'information_schema.SCHEMATA')
141 $queryBuilder->expr()->eq(
143 $queryBuilder->createNamedParameter($connection->getDatabase(), \PDO::PARAM_STR)
150 if (strpos($defaultDatabaseCharset,
'utf8') !== 0) {
152 'Checking database character set failed, got key "'
153 . $defaultDatabaseCharset .
'" instead of "utf8" or "utf8mb4"',
154 'MySQL database character set check failed',
160 'Your database uses utf-8. All good.'
173 $sqlModes = explode(
',', $connection->executeQuery(
'SELECT @@SESSION.sql_mode;')
174 ->fetch(0)[
'@@SESSION.sql_mode']);
175 return array_intersect($this->incompatibleSqlModes, $sqlModes);