Feature #85739

Reduce restrictions on database names introduced for DBAL

Added by J. Peter M. Schuler almost 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2018-08-02
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Since #51093 there are restrictions on database schema names which can be entered during initial TYPO3 setup:

Given database name must be shorter than fifty characters and consist solely of 
* basic latin letters (a-z), 
* digits (0-9), 
* dollar signs ($) 
* and underscores (_).

These restrictions come from mySQL unquoted identifier rules (https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). However all calls should be quoted anyways, so these restrictions could be dropped.

Background:

  1. From what I understood this was a move because of better DBAL support around the change from TYPO3 v6 to v7. Meanwhile Doctrine replaced the old DBAL approach.
  2. I don't get this decision in the first place, as in the moment the database is created the underlying used driver is known and might allow a less restrictive naming (or in theory be even more restrictive). Additionally this was introduced because of mySQL, not because of some other DB.
  3. I stumbled upon this in a new deployment, realising that we have had systems running TYPO3 v6, v7 and v8 which actually had database names not following this approach (having multiple dots in their name). These databases were renamed sometime during a migration to another server and the string was changed in LocalConfiguration.php directly, so we never stumbled upon this restriction change. Nevertheless all these systems ran fine.

So is there a need to have this kind of restrictive naming anymore? I couldn't find anything in the docs regarding this and the old reason seems to be outdated.


Related issues

Duplicated by TYPO3 Core - Bug #90219: "Database name not valid" with sqlite and long path name Closed 2020-01-27

Associated revisions

Revision 66055927 (diff)
Added by Manuel Selbach 3 months ago

[TASK] Check valid database name specific for DBMS

With this change the check for a valid database name will be done
specific for each DBMS.

Resolves: #85739
Releases: master
Change-Id: Ia006a31fb4686fc45ac2ab3862f3a530ed5eef58
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63053
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Benni Mack <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 4 months ago

  • Status changed from New 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/63053

#2 Updated by Gerrit Code Review 4 months ago

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

#3 Updated by Gerrit Code Review 4 months ago

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

#4 Updated by Gerrit Code Review 3 months ago

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

#5 Updated by Gerrit Code Review 3 months ago

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

#6 Updated by Gerrit Code Review 3 months ago

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

#7 Updated by Gerrit Code Review 3 months ago

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

#8 Updated by Daniel Siepmann 3 months ago

  • Duplicated by Bug #90219: "Database name not valid" with sqlite and long path name added

#9 Updated by Gerrit Code Review 3 months ago

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

#10 Updated by Gerrit Code Review 3 months ago

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

#11 Updated by Gerrit Code Review 3 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63053

#12 Updated by Gerrit Code Review 3 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63053

#13 Updated by Manuel Selbach 3 months ago

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

#14 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF