The surety paying off such judgment or execution shall have control thereof and the same right to enforce it as the plaintiff would have had, but for the payment.