
270 Cal.App.2d 429 (1969)
CALIFORNIA AMMONIA COMPANY, Plaintiff and Appellant,
v.
MACCO CORPORATION, Defendant and Respondent.
Civ. No. 11752. 
California Court of Appeals. Third Dist.  
Mar. 5, 1969.
 Bacon, Mundhenk, Stone, O'Brien & Hammond, Bacon, Stone, O'Brien & Hammond and William F. Stone for Plaintiff and Appellant.
 Neumiller, Beardslee, Diehl, Siegert, Glahn & Shephard and Darrell Glahn for Defendant and Respondent.
 REGAN, J.
 California Ammonia Company ("Calamco") appeals from the entry of judgment upon defendant Macco *430 Corporation's ("Macco") motion to dismiss for failure to bring the action to trial within five years after the filing of the complaint, in accordance with the provisions of section 583 of the Code of Civil Procedure.  [fn. 1]
 On January 19, 1962, plaintiff Calamco filed a complaint for negligence, breach of warranty, and breach of contract against defendant Macco (and others not concerned in this proceeding). In May 1963 Macco demurred generally and specially upon the ground that the action was barred by the statute of limitations. (Code Civ. Proc.,  339, subd. 1.) In June 1963 the trial court ordered that the demurrer be sustained with leave to amend. No amendment to the complaint was ever filed.
 On December 28, 1966, plaintiff filed a motion to have the record corrected to reflect the stipulation of counsel for Macco that the demurrer of Macco be overruled, and that Macco file an answer, and for the court's order to shorten the time for pretrial and trial. Macco opposed this motion on December 30, 1966; it did admit, however, that it had been agreeable to the court overruling the demurrer, but that the court at that time did not accept the stipulation.
 On December 30, 1966, Macco separately moved to dismiss the action for lack of prosecution pursuant to section 583 of the Code of Civil Procedure (failure to bring to trial within two years).
 Plaintiff's motion to advance the cause, and Macco's motion to dismiss the action were denied on January 3, 1967. Thereafter, on January 26, 1967, Macco again moved to dismiss the action pursuant to section 583 Code of Civil Procedure for failure to bring the cause to trial within five years and a judgment of dismissal was granted to Macco.
 [1a] Plaintiff Calamco contends:
 1. When the trial court sustained Macco's demurrer with leave to amend, notwithstanding Macco's agreement that the demurrer should be overruled, a trial on issues of law occurred, and a final determination of the action was contemplated. *431
 a. Only by the entry of a judgment of dismissal can plaintiff test the correctness of the court's ruling on the sufficiency of the complaint, since there is no appeal from an order sustaining a demurrer with leave to amend.
 b. Plaintiff may not proceed to have judgment entered because he would thereby be effecting a consent judgment, from which an appeal may not be taken.
 c. Accordingly, plaintiff must await the entry of judgment, and is not subject to the five-year dismissal.
 2. The complaint is sufficient to set forth causes of action, and therefore it was error to sustain the demurrer.
 We hold the action of the trial court in sustaining Macco's demurrer with leave to amend, notwithstanding that Macco was agreeable to the overruling of the demurrer, was not a "trial" within the meaning of section 583 of the Code of Civil Procedure. Here, there was no stipulation extending the time of the trial, nor can plaintiff Calamco bring this case within one of the other statutory exceptions to escape the mandatory provisions of section 583 of the Code of Civil Procedure. (Adams v. Superior Court (1959) 52 Cal.2d 867, 870 [345 P.2d 466].)
 [2] "... A 'trial' is the examination before a competent tribunal, according to the law of the land, of questions of fact or of law put in issue by pleadings, for the purpose of determining the rights of the parties." (Adams v. Superior Court, supra, 52 Cal.2d at p. 870.)
 In Ross v. George Pepperdine Foundation (1959) 174 Cal.App.2d 135, 139 [344 P.2d 368] [petition for hearing by the Supreme Court denied], the court states: "Appellants' first contention is that this cause was brought to trial within five years, thus the dismissal requirements of section 583 are inapplicable. The argument is that the hearings upon and decisions sustaining demurrers, and the summary judgment proceedings, constituted 'partial trials' of issues of law and fact in the case (cf. 16 Cal.Jur.2d,  35, p. 192). Reliance is placed upon Smith v. Los Angeles, 84 Cal.App.2d 297, 301-303 [190 P.2d 943], and Berri v. Superior Court, 43 Cal.2d 856, 859-860 [279 P.2d 8], to sustain this position. They are inapplicable. In both cases a demurrer was sustained without leave to amend, which is not true at bar."
 "In the instant case, none of the rulings on demurrer resulted in a final determination of the action. Each demurrer was sustained with leave to amend, amended complaints were in fact filed, and upon the filing of respondents' answers the *432 case was at issue and ready for trial. 'The rule is established that "the hearing of a demurrer is not a trial, within the meaning of section 583, unless the ruling on the demurrer is a final determination of the rights of the parties." (Anderson v. City of San Diego, 118 Cal.App.2d 726, 731 [258 P.2d 842]; Berri v. Superior Court, 43 Cal.2d 856, 858 [279 P.2d 8].)' (Legg v. United Benefit Life Ins. Co., 136 Cal.App.2d 894, 897 [289 P.2d 553].)" [1b] None of the proceedings in the case at bench constituted a trial within the meaning of section 583 of the Code of Civil Procedure.
 Calamco urges that unless the court on its own motion, or the defendant, moves for a dismissal and judgment is entered pursuant to section 583, the plaintiff must wait for the five years to elapse to seek a ruling on the trial court's order sustaining a demurrer with leave to amend. (See Berri v. Superior Court (1955) 43 Cal.2d 856, 860-861 [279 P.2d 8]; Wilson v. City of Los Angeles (1958) 156 Cal.App.2d 776, 779 [320 P.2d 93].) Finally, Calamco argues, if it had sought to have the demurrer sustained without leave to amend, or had sought entry of a judgment dismissing the action, it would have subjected itself to a holding that it had consented to the judgment of dismissal. (See cases cited in Wilson v. City of Los Angeles, supra, 156 Cal.App.2d at pp. 777-778.)
 Accordingly, Calamco contends that a plaintiff must await the entry of a judgment, is not subject to the five-year dismissal provisions of section 583, and thus is now in a proper forum for determining the sufficiency of the complaint.
 Calamco's failure to avail itself of alternative proceedings, including amending its complaint, moving for reconsideration of the ruling on demurrer, mandamus, or, more importantly, moving for entry of judgment under subdivision 3 of section 581 of the Code of Civil Procedure and then taking a timely appeal, is fatal to its appeal. The language of the amendment to Code of Civil Procedure section 581 is dispositive of the issues raised. This section was amended in 1963 to read:
 "An action may be dismissed in the following cases:"
 "* * *"
 "3. By the court, where either party fails to appear on the trial and the other party appears and asks for the dismissal, or when a demurrer is sustained without leave to amend, or when, after a demurrer to the complaint has been sustained with leave to amend, the plaintiff fails to amend it within the time allowed by the court, and either party moves for such dismissal." *433
 In the State Bar's Review of 1963 Code Legislation, the following comment is made on this change:
 "Code of Civil Procedure  581(3) now allows the plaintiff as well as the defendant to move for dismissal after he fails to amend. The defendant can no longer forestall appeal by the plaintiff by not moving for dismissal." (38 State Bar J. 672.) (Italics added.)
 Witkin, in commenting on this situation, states as follows: "The order sustaining a demurrer is not itself appealable. ... Hence, whether the plaintiff is given leave to amend and fails to do so ... or is denied leave to amend, he cannot review the order until a judgment is entered dismissing the action. This judgment follows as a matter of course. (Berri v. Superior Court (1955) 43 Cal.2d 856, ...) And the plaintiff may have a writ of mandamus to compel the court and clerk to enter the judgment. (Berri v. Superior Court, supra; ...)"
 "* * *"
 "Either party may move for a dismissal (C.C.P. 581(3)); hence the plaintiff may have such a judgment promptly entered and take a prompt appeal." (Italics added.) (2 Witkin, Cal. Procedure (1954) Pleading [1967 Supp.,  506A, p. 531]; see also Lewis Avenue Parent Teachers' Assn. v. Hussey (1967) 250 Cal.App.2d 232, 237 [58 Cal.Rptr. 499].)
 Plaintiff Calamco had two alternative remedies which it could have pursued, and thus did not need to wait for the entry of dismissal under section 583: one, to proceed by way of dismissal pursuant to subdivision 3 of section 581 of the Code of Civil Procedure as amended in 1963; or, two, it could have proceeded via a writ of mandamus. Either procedure would have afforded plaintiff timely appeal wherein it could test the sufficiency of its complaint.
 It is of course true that a judgment will not be reviewed or disturbed on an appeal prosecuted by a party who consented thereto. (Wilson v. City of Los Angeles, supra, 156 Cal.App.2d 776.) There is present in the instant case, however, no stipulation of counsel to a consent decree (cf. Atchison, Topeka & Santa Fe Ry. Co. v. Hildebrand (1965) 238 Cal.App.2d 859, 861 [48 Cal.Rptr. 339]), nor is the doctrine of invited error applicable. (Cf. Estate of Armstrong (1966) 241 Cal.App.2d 1, 7 [50 Cal.Rptr. 339].) The Legislature has authorized a procedure ( 581, subd. 3), and the courts an alternative procedure (mandamus), whereby a plaintiff may seek a timely judgment of dismissal, in order to challenge the court's ruling on the demurrer by a timely appeal. *434
 In view of our foregoing holding, we deem it unnecessary to inquire into the matter of the sufficiency of the complaint, for we have found that the trial court properly dismissed the action pursuant to the provisions of section 583.
 The judgment of the trial court is affirmed.
 Friedman, Acting P. J., and Janes, J., concurred.
NOTES
[fn. 1]  1. This section provides, in pertinent part: "The court may in its discretion dismiss any action for want of prosecution on motion of the defendant and after due notice to the plaintiff, whenever plaintiff has failed for two years after action is filed to bring such action to trial. ... Any action ... shall be dismissed by the court in which the same shall have been commenced ... after due notice to plaintiff or by the court upon its own motion, unless such action is brought to trial within five years after the plaintiff has filed his action [with certain exceptions not applicable here] ...."
