Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2010 at 21:08 UTC
Updated:
17 Oct 2010 at 01:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedThis is not actually necessary for the other patch (the requirements are per-database engine), but I guess it makes sense to restore that.
Comment #2
pwolanin commentedHere's a simple patch - mostly untested.
Comment #3
pwolanin commentedFixed mysql query to use proper place holder based on feedback from Damien.
Comment #4
damien tournoud commentedThis patch makes me all warm and fuzzy inside.
Comment #5
Crell commentedI guess unit tests would be rather silly here. :-) My only question is whether db_version() is still needed, since the only time we'll really be checking the version will be either internal to the DB system or in places where we need to know the type as well, and therefore we'll have the raw connection object anyway.
Comment #6
dries commentedI'd be OK with killing db_version.
Comment #7
pwolanin commentedok, even simpler.
Comment #8
dries commentedThanks, Peter. Committed to CVS HEAD.
Comment #9
damien tournoud commentedReopening this.
PDO actually mandates all database drivers to implement the PDO::ATTR_SERVER_VERSION attribute which gets you the version of the database engine PDO is connected to. We should definitely use that. Verified that this leads to the same result on MySQL and SQLite.
Comment #10
Crell commentedAs soon as we confirm this works on Postgres I am +1. Damien, if you can verify that go ahead and set it RTBC.
Comment #11
sunIn addition, we used to report the database version on the status reports page via http://api.drupal.org/api/function/system_requirements/7 -- which was quite handy.
I see in the above that db_version() was purposively removed, but may I ask to revert that? db_version() was a nice little fast way to quickly retrieve that info, without requiring expert DBTNG skills.
Comment #12
pwolanin commented@sun I think #875674: Report DB version in Status report. is where I was planning to add it back to the status report.
Comment #13
Crell commented+1 on #9. Nice cleanup. The UI changes belong in the issue that pwolanin linked.
Comment #14
sun#9: 878198-database-version.patch queued for re-testing.
Comment #15
dries commentedNice clean-up indeed. Committed to CVS HEAD. Thanks.