Bug #81341

recursive is a reserved keyword in MariaDB 10.2. Causes errors in queries for tt_content...

Added by Jan Slusarczyk 12 months ago. Updated 12 months ago.

Status:
Resolved
Priority:
Could have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2017-05-25
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
mariadb 10.2,recursive,tt_content
Complexity:
Is Regression:
Sprint Focus:

Description

I have stumbled upon strange errors after upgrading MariaDB to 10.2.6 (stable). Errors where in queries for tt_content table, always when the query contains "recursive" column. I have filed a bug report and got an answer that recursive is a reserved keyword and needs to be in backticks to work properly:

https://jira.mariadb.org/browse/MDEV-12918?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=95783#comment-95783

I don't know if it works the same in 8LTS. I am using 7.6LTS


Related issues

Related to TYPO3 Core - Task #83414: Investigate MariaDB 10.2-support for 8 LTS Rejected 2017-12-22
Duplicated by TYPO3 Core - Bug #81388: SQL-keyword "recursive" not enclosed in ticks - inserts into tt_content fail with MariaDB >=10.2 Rejected 2017-05-31

Associated revisions

Revision 18dec8f9 (diff)
Added by Markus Klein 12 months ago

[BUGFIX] Detect upper limit of database server version

Resolves: #81341
Releases: 7.6
Change-Id: Ia188901497d29ff2a2274a4bf220e7c58e665487
Reviewed-on: https://review.typo3.org/53148
Reviewed-by: Johannes Kasberger <>
Tested-by: Johannes Kasberger <>
Tested-by: TYPO3com <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>

History

#1 Updated by Morton Jonuschat 12 months ago

  • Category set to Database API (Doctrine DBAL)
  • Status changed from New to Rejected
  • Assignee set to Morton Jonuschat
  • Priority changed from Must have to Could have

This should be fixed on TYPO3 v8 as we replaced the whole database abstraction layer which gave us such things as quoting field names in all queries.

TYPO3 7LTS is now in priority bugfix mode and while we strive to support alternative MySQL implementations like MariaDB or Percona the fact remains that MariaDB 10.2 is feature-wise closer to MySQL 8.0 than to 5.7 (MySQL 8.0 like MariaDB 10.2 gained recursive common table expressions where the new protected keyword comes from).

Given that MySQL 8.0 is not a supported database platform either and that fixing this on TYPO3 7LTS is almost impossible with the existing database architecture in 7LTS classifying this as a must-fix breakage is not warranted.

Feel free to reopen this issue or create a new one if you see the same problems with MariaDB 10.2 or MySQL 8.0 on TYPO 8LTS - we have a much higher chance of fixing it there due to the modernized database layer.

#2 Updated by Morton Jonuschat 12 months ago

  • Duplicated by Bug #81388: SQL-keyword "recursive" not enclosed in ticks - inserts into tt_content fail with MariaDB >=10.2 added

#3 Updated by Morton Jonuschat 12 months ago

  • Related to Bug #76265: Access module - pages with character like "è" in title has not title visible. added

#4 Updated by Morton Jonuschat 12 months ago

  • Related to deleted (Bug #76265: Access module - pages with character like "è" in title has not title visible.)

#5 Updated by Markus Klein 12 months ago

  • Status changed from Rejected to New

Affected users: Mac with mariadb from homebrew

Possible (dirty) fix in v7:
run through the fields to insert/update in TYPO3_DB and quote them (or just the recursive word).

General thing. The core must validate the DB server version it talks to. If MariaDB 10.2 is like MySQL 8 it has to complain.

#6 Updated by Markus Klein 12 months ago

The current version check is only:

$minimumMysqlVersion = '5.5.0';
if (version_compare($currentMysqlVersion, $minimumMysqlVersion) < 0) {

So no upper limit is checked.

MariaDB reports: 10.2.6-MariaDB

#7 Updated by Gerrit Code Review 12 months ago

  • Status changed from New to Under Review

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

#8 Updated by Gerrit Code Review 12 months ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53148

#9 Updated by Gerrit Code Review 12 months ago

Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53148

#10 Updated by Markus Klein 12 months ago

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

#11 Updated by Georg Ringer 5 months ago

  • Related to Task #83414: Investigate MariaDB 10.2-support for 8 LTS added

Also available in: Atom PDF