Index: wordpress/wp-includes/wp-db.php
===================================================================
--- wordpress/wp-includes/wp-db.php	(revision 3492)
+++ wordpress/wp-includes/wp-db.php	(working copy)
@@ -89,7 +89,7 @@
 
 	function print_error($str = '') {
 		global $EZSQL_ERROR;
-		if (!$str) $str = mysql_error();
+		if (!$str) $str = mysql_error($this->dbh);
 		$EZSQL_ERROR[] = 
 		array ('query' => $this->last_query, 'error_str' => $str);
 
@@ -157,7 +157,7 @@
 			$this->queries[] = array( $query, $this->timer_stop() );
 
 		// If there is an error then take note of it..
-		if ( mysql_error() ) {
+		if ( mysql_error($this->dbh) ) {
 			$this->print_error();
 			return false;
 		}
