
104 Cal.App.3d 359 (1980)
162 Cal. Rptr. 871
UNITED SHIPPERS, INC., Petitioner,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent; TRANSPORT CLEARINGS-BAY AREA et al., Real Parties in Interest.
Docket No. 47544.
Court of Appeals of California, First District, Division Three.
March 10, 1980.
*360 COUNSEL
Jerrold N. Offstein, Jane C. Van Praag and Michael Weisberg for Petitioner.
No appearance for Respondent.
Adams, Duque & Hazeltine, James H. Fleming, John H. Brinsley, Robert M. Mitchell, Jones, Meiklejohn, Kehl & Lyons, Leslie R. Kehl, Feldman, Waldman & Kline, Leland R. Selna, Jr., George G. Weickhardt, Overton, Lyman & Prince, Carl J. Schuck, Frederick A. Clark, John D. McCurdy, Kent E. Whittaker, Terrence Ahern, Kirk H. Doan, Hillix, Brewer, Hoffhaus & Whittaker, Robert E. Gooding, Jr., Steven L. Mayer, Ann V. Brick and Howard, Prim, Rice, Nemerovski, Canady & Pollak for Real Parties in Interest.
OPINION
FEINBERG, J.
The facts are simple. Petitioner filed a complaint in the court below. Real parties in interest (real parties) demurred. The *361 demurrer had a chequered history but, suffice it to say, that on January 15, 1979, it was argued. On January 19, 1979, the clerk of the superior court filed a dismissal of the action without prejudice, upon a written request therefor by petitioner, pursuant to Code of Civil Procedure section 581, subdivision 1.[1] Two days later, respondent superior court issued an order restraining the clerk from proceeding with the dismissal, i.e., entering it upon the judgment roll. Shortly thereafter, petitioner sought relief by way of an extraordinary writ from this court. Its petition was denied as "premature." Thereafter, respondent held a hearing to determine whether it had jurisdiction to rule on the demurrer, i.e., had the action been "dismissed." Respondent concluded it had jurisdiction and thereafter sustained the demurrer without leave to amend. Ultimately, respondent entered a judgment of dismissal, following which, this petition for prohibition or, in the alternative, certiorari or mandate was filed.
Real parties contend that at the hearing on January 15, 1979, the demurrer was submitted and the court had made a "tentative" ruling. Petitioner contends otherwise. In our view, this issue is irrelevant in determining whether petitioner had an absolute right to a dismissal on January 19, 1979. We shall assume, therefore, that real parties are correct and that the demurrer had been submitted prior to petitioner's request for a dismissal.
(1) Does a plaintiff have the absolute right to dismiss an action after a demurrer to his complaint has been submitted to the court for decision, assuming that in all other aspects such a dismissal complies with the conditions imposed by section 581, subdivision 1?
Our answer is that the plaintiff does have such a right.
Section 581, subdivision 1 provides in relevant part as follows: "An action may be dismissed in the following cases: [¶] 1. By plaintiff, by written request to the clerk, filed with the papers in the case, ... at any time before the actual commencement of trial, ... A trial shall be deemed to be actually commenced at the beginning of the opening statement of the plaintiff or his counsel, and if there shall be no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence." (Italics added.)
*362 It appears to us that the plain meaning of the statute is that a plaintiff has a right to dismiss his action even though a demurrer to the complaint has been argued and submitted. At a hearing on a demurrer, there is no "opening statement" as that phrase is understood in law. Certainly, no witness is sworn nor evidence offered. We do not see how the Legislature reasonably could have made it more plain than it did.
Real parties rely on two cases primarily, Goldtree v. Spreckels (1902) 135 Cal. 666 [67 P. 1091] and Berri v. Superior Court (1955) 43 Cal.2d 856 [279 P.2d 8].
In the Goldtree case, the Supreme Court held that the submission of a demurrer to the court constituted a trial within the meaning of section 581, subdivision 1 as it then read for, the court held, there could be two kinds of trials, a trial on the law as in a demurrer or a trial on the facts.
But section 581, subdivision 1 then read in pertinent part as follows: "An action may be dismissed ... in the following cases: 1. By the plaintiff, by written request to the clerk, ... at any time before the trial, ..." (Italics added.)
It was by amendment in 1947 that section 581, subdivision 1 was amended to its present form. Thus, now and since 1947, the section speaks of the "actual commencement of trial" and defines that phrase as we have set forth heretofore. The Legislature is presumed to be aware of case law when it amends a statute upon which there is such case law. (Stafford v. Realty Bond Service Corp. (1952) 39 Cal.2d 797, 805 [249 P.2d 241]; Whitley v. Superior Court (1941) 18 Cal.2d 75, 78-79 [113 P.2d 449].) In amending section 581, subdivision 1, as it did, the Legislature must have intended, among other things, to change the rule of Goldtree. See Parenti v. Lifeline Blood Bank (1975) 49 Cal. App.3d 331 [122 Cal. Rptr. 709]; 2 Cal. Civil Procedure Before Trial (Cont.Ed.Bar 1978) § 31.75, p. 440.)
The Berri case involved an interpretation of section 583, subdivision (b), the five-year mandatory dismissal section. That case held that a hearing on a demurrer was a trial within the meaning of section 583, subdivision (b) so as to bar the involuntary dismissal of an action that had not been brought to trial on the merits within five years of the filing of the complaint. But the language of section 583, subdivision (b), at the time of the Berri case, as now, is the same language as existed in *363 section 581, subdivision 1 prior to the 1947 amendment. Section 583, subdivision (b) speaks only of bringing an action to "trial"; it does not speak of "the actual commencement of trial" nor does it define "trial" in any manner. Berri relied, in part, on Goldtree. For purposes of section 583, subdivision (b), it would appear that Goldtree may still be good law.
We are aware that Witkin takes a contrary position. Witkin asserts, in effect, that the purpose of the 1947 amendment to section 581, subdivision 1 was to change the common law rule in California that a plaintiff could dismiss his action even if actual trial had begun so long as it was before the case was submitted to the judge or jury. Certainly, the 1947 amendment effected such a change. But Witkin goes on to say that dismissal is improper after submission of a demurrer, citing the Goldtree case. (4 Witkin, Cal. Procedure (2d ed. 1971) Proceedings Without Trial, §§ 50-51, pp. 2715-2716.) But, as we have pointed out, we believe the 1947 amendment changed the rule of Goldtree as well.
Real parties contend that if the petition is granted, it will lead to widespread "judge shopping." We think his fears are exaggerated but, in any event, we must take the statute as we find it. If the evil apprehended should become real, it will be for the Legislature to remedy it.
We conclude that the trial court was without jurisdiction to proceed once petitioner filed his dismissal. Therefore, we grant the petition.
The trial court is directed to vacate the judgment of dismissal and to permit the clerk of the court to process petitioner's dismissal so that it will appear, in the records of the court, that the action was dismissed by petitioner pursuant to section 581, subdivision 1.
Peremptory writ will issue accordingly.
White, P.J., and Takei, J.,[*] concurred.
NOTES
[1]  Hereafter, all section references are to the Code of Civil Procedure.
[*]   Assigned by the Chairperson of the Judicial Council.
