Whenever, pursuant to the last four sections, a party is bound by a record, and such party stands in the relation of a surety for another, the latter is also bound from the time that he has notice of the action or proceeding, and an opportunity at the surety’s request to join in the defense.