Ticket #2527 (closed defect: fixed)

Opened 8 months ago

Last modified 3 months ago

Installing and using Silverstripe on Provider who uses custom Mysql Version Names

Reported by: HakTom Owned by: aoneil
Priority: medium Milestone:
Component: (Unknown) Version: 2.2.2-rc2
Severity: medium effort / impact Keywords:
Cc: Hours:

Description

Silverstripe 2.2.1 uses 3 different approaches to check for the Mysql Version.

1. The installer checks for mysql_get_version() which is a bad idea, because the host provider can change this to whatever he likes, in my case to “4.0.27-5.0.45_InodeWebhosting” to define their mysql cluster versions. So in this case, the installer fails.

2. The MysqlDatabase? Class in sapphire/core/model/MysqlDatabase.php selects the Mysql Version with “SELECT VERSION()” which is better, but also fails in my case, where the query returns “5.0.51inode”.

3. The PDODatabase class in sapphire/core/model/PDODatabase.php does the right thing. It selects the version like MysqlDatabase? does, but strips all letters and than substrings the major and minor version number.

i changed the installer and the MysqlDatabase? Class according to the last solution. You will find the diffs attached to this ticket.

Attachments

install.php.diff (0.6 kB) - added by HakTom 8 months ago.
MySQLDatabase.php.diff (393 bytes) - added by HakTom 8 months ago.

Change History

Changed 8 months ago by HakTom

Changed 8 months ago by HakTom

Changed 8 months ago by HakTom

this also applies to 2.2.2rc5

Changed 3 months ago by aoneil

  • status changed from new to closed
  • resolution set to fixed

Committed in r63903/r63904. Thanks!

Note: See TracTickets for help on using tickets.