Added test for affectedRows.