[wp-trac] [WordPress Trac] #31018: Persistent database connections with mysqli

WordPress Trac noreply at wordpress.org
Thu Jan 15 14:07:05 UTC 2015


#31018: Persistent database connections with mysqli
--------------------------------------------------+----------------------
 Reporter:  blobaugh                              |       Owner:
     Type:  enhancement                           |      Status:  closed
 Priority:  normal                                |   Milestone:
Component:  Database                              |     Version:  trunk
 Severity:  normal                                |  Resolution:  wontfix
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:
--------------------------------------------------+----------------------
Changes (by jtsternberg):

 * keywords:  has-patch needs-testing => has-patch needs-testing dev-
               feedback


Comment:

 Replying to [comment:3 pento]:
 > For situations like this, I'd recommend creating a DB drop-in that
 replaces `wpdb::db_connect()` with a persistent version.

 Since azure is slowly becoming a viable option, and things like this exist
 https://wordpress.org/plugins/persistent-database-connection-updater/, it
 would seem we should think about a better solution. Hacking core on every
 upgrade? Ouch.
 A) Gary, I'm guessing something like this would be a proper db drop-in
 replacement: https://gist.github.com/jtsternberg/eec4ab95e11ce9be4807
 B) It seems we should be abstracting some of the functionality in
 `wpdb::db_connect()` to smaller methods. This would allow more precision
 in drop-in replacements. I'll submit a patch for at least that.

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


More information about the wp-trac mailing list