--- PHP_5_3/ext/pdo_mysql/mysql_statement.c 2011/05/16 15:36:12 311087 +++ PHP_5_3/ext/pdo_mysql/mysql_statement.c 2011/05/16 15:37:39 311088 @@ -656,7 +656,11 @@ #endif /* PDO_USE_MYSQLND */ if ((S->current_data = mysql_fetch_row(S->result)) == NULL) { - if (mysql_errno(S->H->server)) { +#if PDO_USE_MYSQLND + if (S->result->unbuf && !S->result->unbuf->eof_reached && mysql_errno(S->H->server)) { +#else + if (!S->result->eof && mysql_errno(S->H->server)) { +#endif pdo_mysql_error_stmt(stmt); } PDO_DBG_RETURN(0);