Task #41151

Improve error message for failling database creation

Added by Nicole Cordes over 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2012-09-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

Description

Due to compatibility (maybe?) the create database command can't use quotes for new database names. Therefore (at least for MySQL databases) the characters to use is limited to 0-9, a-z, A-Z, $, _

This should be mentioned when creating the database fails.

#1

Updated by Markus Klein over 8 years ago

Hi!

Did you enter a database name with quotes? Or does TYPO3 quote somewhere where it is not appropriate?

#2

Updated by Nicole Cordes over 8 years ago

I tried to create a database typo3_6-0_blank. Self quoting is not allowed as the database name is parsed by preg_match('/[^[:alnum:]_-]/', $newDatabaseName)

The problem is the "-" which is not allowed in unquoted database names (see http://dev.mysql.com/doc/refman/5.1/en/identifiers.html)

#3

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14812

#4

Updated by Markus Klein over 8 years ago

Why no just quoting the database name in general?

#5

Updated by Nicole Cordes over 8 years ago

This was discussed by some guys yesterday evening and we were not sure if other databases allow those `` quotes. So the safest way to support all database system was to stay unquoted.

#6

Updated by Markus Klein over 8 years ago

Ok

#7

Updated by Nicole Cordes over 8 years ago

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

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/14897

#9

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/14898

#10

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/14899

#11

Updated by Jigal van Hemert over 8 years ago

  • Status changed from Under Review to Resolved
#12

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/15884

#13

Updated by Alexander Opitz almost 8 years ago

Hi Nicole,

what is the state of the 4.7 fix?

#14

Updated by Wouter Wolters almost 8 years ago

  • Status changed from Under Review to Resolved

4.7 gets only security fixes, closed.

#15

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF