Need additional db version information in WP3.9+
|Reported by:||webaware||Owned by:||pento|
We urgently need a new method on class wpdb that returns the raw database version information string.
$wpdb->db_version() strips out important information required to assist plugin writers with debugging, such as the fact that the database is MariaDB not MySQL. To get around that, many plugins use mysql_get_server_info() to get the raw info string. e.g. to pick just a few:
- Easy Digital Downloads
- NextGEN Gallery / Nextcellent Gallery
- WP Migrate DB Pro
In WordPress 3.9+ using mysqli, this throws a Deprecated warning, which is reasonable since mysqli_get_server_info($wpdb->dbh) should be called instead. Since dbh is a protected member and use_mysqli is a private member, plugin writers have no easy way to access this. We need a new method on wpdb that provides the raw string returned by mysqli_get_server_info.
Plugin writers can then test for that new method with method_exists(), and call it in preference to mysql_get_server_info().
I reckon this really should make it into 3.9, since it affects a bunch of major WordPress plugins.
Change History (14)
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 3.9
- Owner set to pento
- Status changed from new to assigned
- Type changed from defect (bug) to enhancement
- Keywords has-patch commit removed
- Milestone changed from 3.9 to Future Release
comment:10 @pento — 9 months ago
- Milestone Future Release deleted
- Resolution set to maybelater
- Status changed from assigned to closed
comment:11 @nicocasel — 4 months ago
- Resolution maybelater deleted
- Status changed from closed to reopened