Issue Bug Closed

#51383Functional test database name could exceed maximum database name length

Sascha Egerer 08/27/13, 12:32 updated 10/02/18, 12:10

Description

The functional test framework creates a new database. The name of the database is the original database name + _test_ + a 7 chars long sha1 hash.

The maximum database name legth of mysql is 64 characters. (http://dev.mysql.com/doc/refman/5.5/en/identifiers.html)

If the length of the generated database name is higher then 64 characters an exception should be thrown.

The length of the generated name should also be shorter.

Maybe we should simply add _ft + the sha1. So it looks something like that orig_database_name_ft5b92679

The Grant table command can then be changed to

"GRANT ALL ON `' . $this->originalDatabaseName . '_ft%`.* TO `' . $user . '`@`' . $host . '`;"'

Reviews 1