Multi-DB - wp-db.php error line 553

I'm getting the following errors in my dasboard in multiple places

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/mysite/public_html/wp-includes/wp-db.php on line 553

Also when creating new sites i get a white page showing the following errors

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/gallerys/public_html/wp-includes/wp-db.php on line 553

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/mysite/public_html/wp-includes/wp-db.php on line 553

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-includes/wp-db.php:553) in /home/gallerys/public_html/wp-includes/pluggable.php on line 866

Despite this it seems like most of the websites functionality is still working? The new sites are created despite the error codes. These errors still show though in the dashboard of all the sites on the network however.