[wp-trac] [WordPress Trac] #5932: wpdb should reconnect and retry query when "MySQL server has gone away"

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 7 20:49:48 UTC 2012


#5932: wpdb should reconnect and retry query when "MySQL server has gone away"
--------------------------+-----------------------------
 Reporter:  dtc           |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Database      |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------

Comment (by scribu):

 Checking the connection before every single query seems wasteful to me.

 Ideally, it would work like this:

 1. Do query.
 2. Check some flag that says if the query actually reached the server.
 3. Re-connect, if needed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/5932#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list