Project

General

Profile

Actions

Bug #35253

closed

Installer should respect backticks while creating sql queries

Added by Kay Strobach over 12 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2012-03-26
Due date:
% Done:

80%

Estimated time:
0.50 h
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The TYPO3 SQL parser removes backticks from table and field names in SQL statements. This causes errors.

E.g. a valid SQL file entry like this (with backticks):

CREATE TABLE `user_piwikintegration_site` (
  `group` varchar(250) NOT NULL,
) TYPE=InnoDB  AUTO_INCREMENT=2 ;

is converted to this invalid SQL (without backticks):

CREATE TABLE user_piwikintegration_site ( group varchar(250) NOT NULL ) ENGINE=InnoDB;

While the first query is valid, the modified query causes an error:

Error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group varchar(250) NOT NULL' at line 2

The Problem can be easily fixed, by editing t3lib_install::getUpdateSuggestions in t3lib/class.t3lib_install.php

Todo:
  • add backticks around table names
  • add backticks around fieldnames

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #34557: Missing backticks in t3lib_install_Sql->getUpdateSuggestionsClosed2012-03-06

Actions
Actions

Also available in: Atom PDF