?
avatar progreccor
progreccor
31 Mar 2021

Steps to reproduce the issue

Try creating a database name with a dot in it

Expected result

Work as in Joomla 3

Actual result

I get error "The database name is invalid. It must not contain the following characters: \ / ."

System information (as much as possible)

Centos 7, php 7.4

Additional comments

I have a rule - create database names equal to the domain name. Now I can't do that.

On some hosting provider databases created with dots in their names.

Please - let's remove the dot from the forbidden characters.

Скриншот 31-03-2021 105335

avatar progreccor progreccor - open - 31 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Mar 2021
avatar progreccor progreccor - change - 31 Mar 2021
The description was changed
avatar progreccor progreccor - edited - 31 Mar 2021
avatar bembelimen
bembelimen - comment - 31 Mar 2021
avatar progreccor
progreccor - comment - 31 Mar 2021

That's for a reason:

https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

but Joomla always quote all identifiers! There was no problems with that

avatar progreccor
progreccor - comment - 31 Mar 2021

Some hosting providers create databases with dot in its name. And Joomla 3 works fine before on this hostings.
We may encounter serious problems

avatar progreccor progreccor - change - 31 Mar 2021
The description was changed
avatar progreccor progreccor - edited - 31 Mar 2021
avatar kernusr
kernusr - comment - 31 Mar 2021

That's for a reason:

https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

grafik

This condition applies to queries that do not escape the name of the database. But in joomla the database always is escaped

I will add that some hosts I know long time used the {Owner}.{Database_Name} pattern and Joomla 3 worked fine in such conditions.
The introduction of this restriction will lead to the fact that users have to create a new database before upgrading to Joomla 4.

avatar brianteeman
brianteeman - comment - 31 Mar 2021

I will add that some hosts I know long time used the {Owner}.{Database_Name} pattern and Joomla 3 worked fine in such conditions.

Could you give an example please so that we can test. I know that all the hosts I use have a owner_databasename setup

avatar PhilETaylor
PhilETaylor - comment - 31 Mar 2021

I have never seen a host with a period in database names ever. Only underscores.

avatar progreccor
progreccor - comment - 31 Mar 2021

I will add that some hosts I know long time used the {Owner}.{Database_Name} pattern and Joomla 3 worked fine in such conditions.

Could you give an example please so that we can test. I know that all the hosts I use have a owner_databasename setup

Joomla 3 works great with dots in database name. So I can't upgrade from joomla 3 to Joomla 4 if my database have dot in the name.

That's weird situation.

avatar PhilETaylor
PhilETaylor - comment - 31 Mar 2021

A Production Department Meeting in 2019 determined the minimum MySQL version for Joomla 4 would be

MySQL 5.6 (Note: The minimum MySQL version can be subject to change during the lifetime of Joomla 4 if necessary)

The officia Joomla 4l requirements page still states Mysql 5.6+

The official Mysql 5.6 reference at https://dev.mysql.com/doc/refman/5.6/en/identifiers.html states (by omission) that periods are not allowed in identifiers.

avatar progreccor
progreccor - comment - 31 Mar 2021

A Production Department Meeting in 2019 determined the minimum MySQL version for Joomla 4 would be

MySQL 5.6 (Note: The minimum MySQL version can be subject to change during the lifetime of Joomla 4 if necessary)

The officia Joomla 4l requirements page still states Mysql 5.6+

The official Mysql 5.6 reference at https://dev.mysql.com/doc/refman/5.6/en/identifiers.html states (by omission) that periods are not allowed in identifiers.

I see this line:

 Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000:

    ASCII: U+0001 .. U+007F

    Extended: U+0080 .. U+FFFF 

In Joomla database name is always quoted.
So I don't see the prohibition

avatar PhilETaylor
PhilETaylor - comment - 31 Mar 2021

Ive just run a test and Joomla 4 seems to run fine with a period in the database name by changing the db name in config after installation, but like you say, you cannot install it with a period In the name. like you say, joomla is quoting the identifiers and therefore according to the mysql docs a period (U+002E) should be allowed.

So I guess the decision Joomla needs to make is to allow it (like in Joomla 3) or not ...

avatar progreccor
progreccor - comment - 31 Mar 2021

Yes, Joomla 3 allow dot in the database name. So I think that Joomla 4 should do the same.
Alsow I run sites with dot in database name about 3 years.
I run about 70 sites.
There were no problems at all!

avatar PhilETaylor
PhilETaylor - comment - 31 Mar 2021

Please test #32949

avatar richard67 richard67 - change - 31 Mar 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-03-31 17:48:28
Closed_By richard67
avatar richard67 richard67 - close - 31 Mar 2021
avatar richard67
richard67 - comment - 31 Mar 2021

Closing as having a pull request. Please test #32949 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment