Opened 8 years ago
Closed 5 years ago
#40037 closed enhancement (fixed)
Add ability to ask wpdb for full db server info
Reported by: | clarinetlord | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Database | Keywords: | has-patch |
Focuses: | Cc: |
Description
Currently, calling wpdb::db_version()
only returns the version number of the db server. It would be useful to have a separate method called db_server_info()
that returned the full string with vendor and version. That way one wouldn't have to use the raw sql function mysqli_get_server_info()
outside of wpdb and allows wpdb
to properly abstract this functionality.
Attachments (2)
Change History (8)
#3
@
6 years ago
- Keywords needs-unit-tests removed
Thanks for the updated patch @birgire. I agree that this probably doesn't need additional unit tests, as it is implicitly covered already.
Note: See
TracTickets for help on using
tickets.
This enhancement would be useful in #39165 where it currently uses:
I refreshed the patch into a new 40037.2.diff, according to the Coding Standard (e.g. use tabs for indentation, added @since etc).
Regarding a "unit test" for the method, I think it's implicitly covered with the existing test method for the db version:
as
$wpdb::db_version()
would be a wrapper for$wpdb::db_server_info()
.Otherwise this kind of test:
feels like we're just testing the output type of the PHP server info functions.