#42812 closed enhancement (fixed)
Use MySQLi when available by default
Reported by: | dd32 | Owned by: | dd32 |
---|---|---|---|
Milestone: | 4.9.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Database | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
4 years ago when we added MySQLi support to WordPress #21663 we gated MySQLi support on the PHP version, PHP 5.5+ (or if they're running a development version)
MySQLi has been extremely stable over the last 4 years, and I think it's time we open it up to more users.
For users on PHP 5.2~5.4 switching to MySQLi doesn't provide any benefits, but it does allow WordPress to consider using more of the MySQLi features (for example, #42352) as more sites change over in the future.
The attached patch enables MySQLi by default.
Setting to Future pending agreement.
Attachments (1)
Change History (9)
#1
@
7 years ago
- Keywords commit added; 2nd-opinion removed
- Milestone changed from Future Release to 4.9.2
#2
@
7 years ago
I'm hesitant to want to roll it out in a point release, purely for fear of breakage.
That being said, I can't imagine anything would really break, as we include a fallback of MySQLi -> MySQL in the event of a connection failure.. so.. lets go for it?
#3
@
7 years ago
Doing enhancements in point releases is going to take a bit of getting used to. Best way is to dive right in!
#4
@
7 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 42388:
#5
@
7 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
#7
@
7 years ago
It was perhaps a mistake to roll this out in a point release because:
- Those using mysql on sites where both mysql and mysqli are available experienced breakage (I can't imagine I'm the only one).
- It's not clear to the naive user that the breakage can be corrected by defining WP_USE_EXT_MYSQL as true (or even what caused the breakage), and until it is corrected database corruption can ensue.
- Users have no opportunity to make a backup before an automatic update.
#8
@
7 years ago
I just spent the last 4 hours trying to figure out what caused many of my websites to break and fixing it. Many plugins rely on the open MySQL-Connection and cannot detect that suddenly that was switched to MySQLi. I also used the open MySQL-Connection for many things.
Thanks to @rhirschfeld who probably saved me another 4 hours with the hint on defining WP_USE_EXT_MYSQL.
(Yes i created an account for this. This issue is big.)
Let's do it. We can roll this out in a 4.9.x release.