Bug #67531

SqlParser does not quote identifiers in CREATETABLE

Added by Morton Jonuschat about 1 month ago. Updated 25 days ago.

Status:Resolved Start date:2015-06-16
Priority:Should have Due date:
Assigned To:Morton Jonuschat % Done:

100%

Category:DBAL Spent time: -
Target version:-
TYPO3 Version:7 Is Regression:No
PHP Version:5.6 Sprint Focus:
Complexity:medium

Description

When creating an index through a CREATE TABLE statement the generated SQL does not properly quote index, table and field names. This leads to „wrong“ SQL statements like

CREATE UNIQUE INDEX versionextrepo ON tx_extensionmanager_domain_model_extension (extension_key, version, repository)

where none of the identifiers has been quoted.

Associated revisions

Revision 88f2cf21
Added by Morton Jonuschat 25 days ago

[TASK] dbal: Add support for ALTER TABLE ADD/DROP KEY

Add support for creating and removing indices to DBAL. The SQL is
generated using the respective ADOdb methods, so adding/removing
PRIMARY keys is not possible.

MySQL prefix lengths will be removed from columns in an index
definition unless the DBMS specifically enables support for this
feature. To ensure that index columns get properly quoted by
ADOdb the field names need to be wrapped in backticks.

Due to the common requirement that index names must be unique within a
database/schema the requested index name will be prepended with a
unique table name identifier.

Resolves: #67445
Resolves: #67531
Releases: master
Change-Id: I274be8df3078867309dde0d5771853c67903719d
Reviewed-on: http://review.typo3.org/40397
Reviewed-by: Stephan Großberndt <>
Tested-by: Stephan Großberndt <>
Reviewed-by: Markus Klein <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Morton Jonuschat about 1 month ago

  • Status changed from New to In Progress

#2 Updated by Gerrit Code Review about 1 month ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#3 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#4 Updated by Gerrit Code Review about 1 month ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#5 Updated by Gerrit Code Review about 1 month ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#6 Updated by Gerrit Code Review 25 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#7 Updated by Gerrit Code Review 25 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#8 Updated by Gerrit Code Review 25 days ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#9 Updated by Gerrit Code Review 25 days ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#10 Updated by Gerrit Code Review 25 days ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#11 Updated by Morton Jonuschat 25 days ago

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

Also available in: Atom PDF