How to use the word 'recursive' as a column name in MariaDB 10.2

327 Views Asked by At

In my TYPO3 v7.6 installation, I have an SQL script with the following line:

 recursive tinyint(3) unsigned DEFAULT '0' NOT NULL,

This tries to create a column named 'recursive'.

Unfortunately, recursive is a reserved keyword since MariaDB 10.2. I tried escaping the word like this:

`recursive`

but this still gave me the same error as before:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB | | | server version for the right syntax to use near 'recursive tinyint(3) unsigned NOT NULL | | | default '0'' at line XYZ.

How can I edit my statement to make this work? Downgrading MariaDB is not an option.

2

There are 2 best solutions below

1
On

TYPO3 7.6 is not compatible with MariaDB 10.2. As you've already stated that downgrading MariaDB is not an option, you're only options are:

  1. Upgrade to a newer version of TYPO3
  2. Fix the problem in TYPO3 7.6 yourself
  3. Contact TYPO3 GmbH to ask if MariaDB compatibility has been build into the ELTS (Extended Long Term Support) version or if you can sponsor this.

As TYPO3 7.6 is a very old version and if you don't already have ELTS (which ends at the end of this year anyway) there are multiple security issues with it, I'd recommend upgrading to a newer version.

0
On

I just had the same issue during updating from 6.2 to 7.6 in order to bring the installation to the current version 12.4.

Because

ALTER TABLE sys_file_collection ADD recursive tinyint(4) NOT NULL default '0';

was the first step in the Upgrade Wizard and I couldn't skip it, I just added the column with the following SQL-Query in phpMyAdmin:

ALTER TABLE sys_file_collection ADD `recursive` tinyint(4) NOT NULL default '0';

It seemed to work for me to continue the further Upgrade Wizard steps ...