[wp-trac] [WordPress Trac] #19324: Allow more flexible mysql_connect configuration (compression, ssl, etc)

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 24 19:46:54 UTC 2012


#19324: Allow more flexible mysql_connect configuration (compression, ssl, etc)
-------------------------------------------------+-------------------------
 Reporter:  Otto42                               |       Owner:
     Type:  feature request                      |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Database                             |  Review
 Severity:  normal                               |     Version:  3.3.1
 Keywords:  needs-refresh needs-patch 2nd-       |  Resolution:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by JustinK101):

 * cc: kobenews@… (added)
 * keywords:   => needs-refresh needs-patch 2nd-opinion
 * version:   => 3.3.1


Comment:

 I use '''MYSQL_CLIENT_COMPRESS''', it reduces the amount of traffic
 between the web server and database significantly. Currently I have to
 modify core, and change ''/wp-includes/wp-db.php'' every release. It quite
 annoying. I propose a new configuration parameter:

 {{{
     define(WP_MYSQL_CLIENT_COMPRESS, true);
 }}}


 By default its '''false'''. Which then in ''wp-db.php'' I purpose the
 following change:

 {{{
         if ( WP_DEBUG ) {
                 $this->dbh = mysql_connect( $this->dbhost, $this->dbuser,
 $this->dbpassword, true,  WP_MYSQL_CLIENT_COMPRESS ?
 WP_MYSQL_CLIENT_COMPRESS : null);
         } else {
                 $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser,
 $this->dbpassword, true,  WP_MYSQL_CLIENT_COMPRESS ?
 WP_MYSQL_CLIENT_COMPRESS : null);
         }
 }}}

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


More information about the wp-trac mailing list