Ticket #2527 (closed defect: fixed)
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.
