From b15fec4e4211772ad58a58f24e75154cca2a9a2b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 24 Aug 2012 17:44:21 +0000 Subject: [PATCH] Basic support for the mysql_connect() new_link and client_flags arguments. props Otto42, fixes #19324. git-svn-id: https://develop.svn.wordpress.org/trunk@21609 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 9df8329601..2600d8e22a 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1135,10 +1135,13 @@ class wpdb { $this->is_mysql = true; + $new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true; + $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0; + if ( WP_DEBUG ) { - $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true ); + $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags ); } else { - $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true ); + $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags ); } if ( !$this->dbh ) {