errors surfacing when using set_error_handler

Description

So, I've been getting some strange errors surfacing while developing a plugin. Three errors along the lines of "mysql_free_result(): supplied argument is not a valid MySQL result resource."

They seem to be normally suppressed, but surface when using set_error_handler(), and only when trying to create a table. It appears that in "wp-includes/wp-db.php" that the result of the query isn't being checked before being passed to the MySQL functions.