
    [S. F. No. 4105.
    In Bank.
    April 4, 1905.]
    B. DE LA BECKWITH, Administrator, etc., Petitioner, v. SUPERIOR COURT OF COLUSA COUNTY et al., Respondents.
    Action to Determine Water-Bights—Boling on Demurrer—Failure to Amend—Motion to Bring in Parties—Jurisdiction—Showing not Bequired.—In an action to determine water-rights, where the court sustained a demurrer to the complaint as to certain defendants, •with leave to amend, which plaintiff failed to do, and overruled demurrer as to other defendants, who have answered, the court has jurisdiction to hear and determine a subsequent motion of plaintiff to vacate the order sustaining the demurrer, and to bring in the defendants thereto as necessary ¡parties to a complete determination of the action; and no showing as to mistake, inadvertence, surprise, or excusable neglect, under section 473 of the Code of Civil Procedure, is required to give such jurisdiction. ■
    Id.—Buling on Demurrer not Law of Case.—The ruling sustaining the demurrer did not become in any sense the law of the ease in the superior court, or preclude the court from afterward changing its ruling; and the mere fact [that plaintiff had failed to amend within the time allowed did not necessitate a denial of the application to bring in the defendants as necessary parties.
    Id.—Effect of Order Sustaining Demurrer—Dismissal—Power of Court.—'Though an order sustaining a demurrer where no amendment is made has the effect of relieving the demurring party from further defending in the absence of subsequent action,by the court, and, in such absence, may form the basis of a judgment of dismissal, it is not a judgment, anct does not have the effect of finally and irrevocably dismissing the > demurring party from the action, nor affect the power of the court to order him brought before the court as a necessary party and to reconsider the order sustaining the demurrer.
    Id.—Mandamus—Compelling Exercise of Jurisdiction—Question of Benefit.—Though this court will,, not grant a writ of mandate where it clearly will result injno substantial benefit; yet where the superior court has denied a motion to bring in parties for want of power, and it cannot be said that the court would not be justified in bringing in the 'parties named, nor that the petitioner is not seeking a substantial benefit, he has the right to a writ of mandate to compel the trial court to exercise its jursidiction by hearing and disposing of the motion.
    APPLICATION for Writ of Mandate to the Superior Court of Colusa County. H. M. Albery, Judge.
    
      The facts are stated in the opinion of the court.
    A. L. Shinn, S. C. Denson, B. M. F. Soto, J. W. Dorsey, and Ernest "Wyand, for Petitioner.
    Frank H. Gould, for Bespondents.
   ANGELLOTTI, J.

This is an application for a peremptory writ of mandate. There is no controversy as to the material facts, which are as follows, viz.:—

An action wherein this plaintiff was plaintiff, and various persons and corporations were defendants, was pending in the superior court of Colusa County, the object thereof being to have it determined that the plaintiff’s intestate was the owner of certain water locations and water-rights and rights of way, that whatever right, title, or interest was held by defendants therein was held by defendants in trust for plaintiff, and to require defendants to convey all of the same to plaintiff.

Demurrers to the amended complaint had been interposed by the defendants, and the demurrers of some defendants had been overruled, while the demurrers of others had been, by order made and entered, sustained, with leave to plaintiff to amend his complaint within ten days.

Plaintiff had failed to amend, but no final judgment in favor of the defendants whose demurrers had been sustained had been ordered or entered.

The defendants whose demurrers had been overruled, served and filed their answer to the amended complaint.

Under these circumstances, plaintiff moved in the court below, upon notice to the defendants whose demurrers had been sustained, “for an order vacating the order of said court sustaining the demurrers of said defendants, and bringing the said defendants into court and overruling the demurrers of said defendants,” upon the ground,—1. That a complete determination of the controversy cannot be had without said defendants, and their presence will prevent a multiplicity of suits; and 2. That the orders sustaining the demurrers were inadvertently made, for the reason that they were not well taken. The said defendants objected to the hearing or consideration of the motion upon various grounds, amounting substantially to this, viz., that the orders sustaining the demurrers were in effect res judicata, and the court had no power to set aside or vacate the same, directly or indirectly; that by reason thereof said defendants had been dismissed from the action, and the court had lost jurisdiction over them; and that so long as such orders remained in force the court had no power or jurisdiction to bring said defendants back into the action. It was further objected that no showing was made to the effect that the orders were made through any inadvertence, surprise, or excusable neglect, as provided in section 473 of the Code of Civil Procedure, relative to relief from orders and judgments.

The ruling of the court upon the objections was as follows, viz.: “The court having duly considered the same, ruled that the objection to entertain such motion be sustained upon the ground that the court had no power to hear the motion without a showing.

Thereupon the plaintiff applied to this court for a peremptory writ of mandate, requiring said superior court and the judge thereof simply to take jurisdiction of said motion and hear the same upon its merits.

We are satisfied that the superior court had the power to entertain the motion, and that no showing of “mistake, inadvertence, surprise, or excusable neglect,” which was evidently the “showing” referred to by the superior court, was essential as a prerequisite to, the exercise of such power. The motion was in part for an order bringing said defendants in as parties, upon the ground that a complete determination of the controversy could not be had without their presence. The statute expressly authorizes such an order, providing that “when a complete determination of the controversy cannot be had without the presence of other parties, the court must then order them to be brought in, and to that end may order amended and supplemental pleadings, or a cross-complaint to be filed, and summons thereon to be issued and served.” (Code Civ. Proc., sec. 389.) The court having jurisdiction of the cause necessarily has jurisdiction to entertain an application for an order bringing in such parties, at any time prior to judgment, and where such an application is made the court ought to hear the same upon its merits, in order that such parties may be brought in, if their presence is essential to a complete determination of the controversy. So far as the jurisdiction of the court to hear such an application is concerned, it can make no material difference whether the parties sought to be brought in were or were not originally named as parties to the action. The prior proceedings in the action in relation to them, where they were once parties, may have been such as to finally dispose of the issues in their favor, but this is a matter that goes to the merits, and not to .the jurisdiction of the court to hear the application upon the merits, and rule upon the same.

As, however, a writ of mandate will not be granted where it appears that the relator has no right to the relief which it is his ultimate object to attain, and that the writ will serve no purpose except that of enforcing a mere abstract right, unattended by any substantial benefit (see Gay v. Torrance, 145 Cal. 144, and cases there cited; Kerr v. Superior Court, 130 Cal. 183), it would appear to follow that the writ should not issue here, if the facts shown are such that the superior court must of necessity have denied the application. But no such facts appear. The mere fact that an order had been made sustaining the demurrers of these parties to the amended complaint, with leave to plaintiff to amend, and that plaintiff had failed to amend within the time allowed, did not necessitate a denial of the application. The ruling of the court upon the demurrers had not in any proper sense of the term become the law of the case. It is a most common occurrence for a trial court to change its rulings during the progress of a trial, upon questions of law, and no one would contend that it is not within its power to do so, or that it should not do so when satisfied that the former ruling was erroneous. A ruling on demurrer occupies no better position in this regard than any other ruling from which an appeal could not be taken, and has frequently been disregarded when the same point subsequently arose in the same case in another way. In Lawrence v. Ballou, 37 Cal. 518, a demurrer to a complaint in ejectment was sustained, and the complaint having been amended and the action having come on for trial, a motion for a nonsuit was made upon an opening statement of plaintiff’s counsel, upon the ground that the statement showed only such title in plaintiff as had been held insufficient by the court in ruling on the demurrer. The motion was granted, and in reversing the judgment this court said, “The doctrine that a previous ruling has become the law of the case has no application except as to the decisions of appellate courts. ... If, at the trial of a; cause at nisi prius, the court makes a ruling upon a certain point, the court is not bound by it, if the same point arises again. On the contrary, the court may, and should, change its ruling, if, in the mean time, it has become satisfied that it was erroneous.”

In Sherburne v. Straun, 52 Kan. 39, a motion of defendant for judgment on the pleadings was granted, notwithstanding a prior order overruling the demurrer to the complaint, the supreme court of Kansas saying: “The court retained complete jurisdiction over the case until final judgment and had ample power to correct its former ruling on the demurrer, if erroneous.” In Richman v. Board, 77 Iowa, 513, 524, where the trial court had practically reconsidered its ruling on demurrer, the supreme court of Iowa said: “We are not prepared to hold that if, during the trial of the issues of an action a court becomes convinced of error, he may not correct it. It would be a seripus impediment to a fair and speedy disposition of causes if such a rule was to obtain.” (See, also, Perry v. Baker, 61 Neb. 841, and First National Bank v. Williams, 126 Ind. 423.)

An order sustaining a demurrer is not a judgment, and does not have the effect of finally and irrevocably dismissing the demurring party from the action. “It may form the basis for rendering a judgment, but it is not itself a judgment” (Sivers v. Sivers, 97 Cal. 518), is not appealable, and can be reviewed by an appellate court only on appeal from a final judgment subsequently given. Upon such an order being made without leave to amend, or where it is made with leave to amend and no amendment is made, the party whose demurrer has been sustained may become entitled to a judgment, which may effectually bar further proceedings against him in the matter from which he has been dismissed. In the absence of such a judgment, however, the mere order constitutes no bar, and if, at any time prior to judgment, it is made to appear to the court that a complete determination of the controversy cannot be had without the presentee of such party, we can conceive of no good reason why the court may not make such orders as will have the efféct of bringing such party into the action again. He has never really been effectually dismissed from the action, and, technically speaking, is not a new party at all, but the order sustaining his demurrer has the effect of relieving him from the necessity of further defending in the absence of subsequent action by the court. Until final judgment in his favor, he is, however, within the jurisdiction of the court in that action, and the statute which authorizes the court to bring in any parties whose presence is essential is broad enough to include all persons not then actively before the court in the action. We entertain no doubt as to the power of the court, at any time prior to final judgment in favor of a party, to reconsider a ruling sustaining his demurrer to a pleading. Where it is made to appear to the trial court, prior to final judgment, that the presence of the party whose demurrer has' been sustained is essential to a complete determination of the controversy, and that its prior ruling on demurrer was erroneous, we have no doubt that it ought to reconsider such ruling. Its jurisdiction, under the circumstances, to make any and all such orders as may be necessary to so place such party that the controversy may be finally and speedily determined is ample.

The plaintiff was entitled to have the trial court entertain and consider his motion on its merits. It is not intimated that the records, files, and papers in the action, including the answers of certain defendants filed subsequent to the ruling on demurrer, did not show a ease which would justify the court in bringing in the parties named, and in concluding that it had erred in sustaining their demurrers to the amended complaint. We cannot say, therefore, that the petitioner is here seeking to enforce a mere abstract right, unattended by any substantial benefit.

Under these circumstances, there can be no serious doubt as to the right of plaintiff to a writ of mandate, compelling the trial court to exercise its jurisdiction, by hearing and disposing of the motion. This, clearly, it has not done. The order made by it upon the disposition of the motion was precisely the same in effect as the order considered by this court in Cahill v. Superior Court, 145 Cal. 42,—viz., a dismissal of the motion for lack of jurisdiction. In this ease, as in that, there was no question of fact to be determined by the trial court as a prerequisite to assuming jurisdiction of the motion, and such court decided “as matter of law purely” that it could not in any case entertain a motion of the character here made, in the absence of a showing of mistake, inadvertence, surprise, or excusable neglect on the part of the one making the motion. As was said of a similar case in Cahill v. Superior Court, “This was a proposition not dependent on any facts whateyer, but wholly upon a consideration of the powers of the court as defined by the constitution and statutes.’’ That mandamus will lie to compel a court having jurisdiction to act under such circumstances, in the absence of other plain, .speedy, and adequate remedy, is fully established by the opinion in Cahill v. Superior Court, 145 Cal. 42, and the cases therein cited. In this case there is no other plain, speedy, and adequate remedy.

Let a peremptory writ of mandate issue as prayed for.

Shaw, J., Van Dyke, J., Lorigan, J., Henshaw, J., and Beatty, C. J., concurred. 
      
       14 Am. St. Rep. 308
     