(a) If a judgment recovered against principal and surety shall be paid by the surety, the creditor shall mark such judgment to the use of the surety so paying the same; and the transferee shall, in the name of the plaintiff, have the same remedy by execution or other process against the principal debtor as the creditor could have had, the transfer by marking to the use of the surety being first filed of record in the court where the judgment is.
(b) Where there is a judgment against several debtors or sureties and any of them shall pay the whole, the creditor shall mark such judgment to the use of the persons so paying the same; and the transferee shall, in the name of the plaintiff, be entitled to an execution or other process against the other debtors or sureties in the judgment, for a proportionable part of the debt or damages paid by such transferee; but, no defendant shall be debarred of any remedy against the plaintiff or the plaintiff's representatives or assigns by any legal or equitable course of proceeding whatever.