[wp-trac] [WordPress Trac] #21663: Use PDO or mysqli for MySQL queries when available

WordPress Trac noreply at wordpress.org
Tue Feb 25 16:14:24 UTC 2014


#21663: Use PDO or mysqli for MySQL queries when available
------------------------------+------------------
 Reporter:  scottconnerly     |       Owner:
     Type:  task (blessed)    |      Status:  new
 Priority:  normal            |   Milestone:  3.9
Component:  Database          |     Version:  3.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+------------------

Comment (by aaroncampbell):

 Replying to [comment:193 pento]:
 > aaroncampbell, you [comment:146 mentioned previously] that we've had
 problems with adding defines in the past - are there particular problems
 we've had that you think would apply to this situation? Given how early
 `$wpdb` is created, it seems a define would be the only practical way for
 a site to be able to change the driver.

 Sorry, I missed this with my last comment.  The problem has been mostly in
 unit testing.  If you define something like `USE_EXT_MYSQL` to make a unit
 test to see that it works, you can't then change it during the testing so
 that another unit test can test the other option.  If filters can't be run
 at the point where the DB is loaded though, we don't have a lot of
 options.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21663#comment:198>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list