Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#5 | no_mysql_if_mysqli_1.patch | 1.04 KB | David Strauss |
#2 | no_mysql_if_mysqli_0.patch | 1.03 KB | David Strauss |
#1 | no_mysql_if_mysqli.patch | 1.03 KB | David Strauss |
Comments
Comment #1
David StraussMy cvs diff produced a cabbage patch kid. This only removes mysql as an installation option when mysqli is available. It also removes a redundant call to drupal_detect_database_types().
Comment #2
David StraussUpdated to remove an extra space.
Comment #3
David StraussComment #4
drewish CreditAttribution: drewish commented+1 this i a logical change, mysqli is the better way to go. i'd remove that comment along with the redundant drupal_detect_database_types() call.
Comment #5
David StraussThis patch removes the extraneous comment.
Comment #6
David StraussThis is a really simple change. I think this is RTBC.
Comment #7
chx CreditAttribution: chx commentedAs most ppl have only the choice between mysql and mysqli this is a very good patch as the select box itself will disappear. If someone installs without PHP knowledge she will have no idea what mysqli whatsoever, so it's very good to automate the choosing.
Comment #8
catchI was just following this on irc, looked in my settings.php file, and whoops - it's been mysql (no i) since we originally installed on drupal 4.5.x - I kept c&ping that line in from settings.php to settings.php every upgrade and it never crossed my mind to use mysqli until I saw this patch.
So I think it'd be more than worth adding a prompt somewhere in the upgrade process, or maybe the status logs?, suggesting people switch. Not necessarily part of this patch though.
Comment #9
David Strauss@catch settings.php is typically not writable during upgrades, but we could put it in as a warning on the site report page if you're using mysql and mysqli is available.
Comment #10
catchThat sounds great. Big +1 to the idea in general.
I would've caught it as soon as I upgraded to 5.x had that warning been in place, but as it was I overlooked completely. I guess 4.5.x defaulted to mysql so I used that, and never gave it another thought afterwards. Most people just copy their settings.php back into the folder after upgrading drupal files, so you might never even look at your settings.php after installing - especially now it's web based.
Comment #11
Crell CreditAttribution: Crell commentedWhat exactly is the benefit of mysqli over mysql when you're not using any of the newer MySQL features? I don't believe we are...
Comment #12
David Strauss@Crell
* There's no advantage for mysql over mysqli.
* We're already requiring MySQL 4.1, the minimum DB for mysqli.
* Pointless choices are bad things to ask of users.
* mysqli has cleaner code than mysql.
Comment #13
Dries CreditAttribution: Dries commentedGood catch. Thanks, David.
Comment #14
David Strauss@catch See #149537 for my patch to add the warning.
Comment #15
David StraussComment #16
(not verified) CreditAttribution: commented