(bug 39287) Fixed error checking in DatabaseMysql::fetchObject.
According to the libmysql API documentation, mysql_fetch_row,
upon which the PHP functions mysql_fetch_object, etc. are
based on, does not reset the error number or message upon
success. So calling mysql_errno() after a successful fetch
may return the error of the previous function call.
This commit changes DatabaseMysql::fetchObject and similar
functions to only check for specific error numbers that are
explicitly documented to be expected from mysql_fetch_*.
Change-Id: Iacb78828885a8a0d4e499a681d938a6adf651582