Return affected_rows and don't try to access non-existent rows
Display more useful result blocks for all queries