Index: src/wp-includes/wp-db.php
===================================================================
--- src/wp-includes/wp-db.php	(revision 26438)
+++ src/wp-includes/wp-db.php	(working copy)
@@ -1139,7 +1139,12 @@
 		$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
 
 		if ( WP_DEBUG ) {
+			$error_reporting = error_reporting();
+			if ( defined( 'E_DEPRECATED' ) ) {
+				error_reporting( $error_reporting ^ E_DEPRECATED );
+			}
 			$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
+			error_reporting( $error_reporting );
 		} else {
 			$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
 		}
