only set rowsAffected when err == nil
only set rowsAffected when err == nil

[#115214833]

Signed-off-by: Kris Hicks <6d3f751023bc04266d4da2ff94804f4240839fe2@pivotal.io>

zachgersh/atc,zachgersh/atc,zachgersh/atc,zachgersh/atc