If an action is commenced within the time prescribed and is dismissed upon the trial or upon appeal after the time limited for bringing a new action, the plaintiff or, if the plaintiff dies and the cause of action in favor of the plaintiff survives, the heirs or representatives may commence a new action upon the cause of action within one year after the dismissal or reversal on appeal. All defenses available against the action, if brought within the time limited, are available against the action when brought under this provision.