
32 Cal.2d 688 (1948)
ROBERT BARLOW, Petitioner and Appellant,
v.
CITY COUNCIL OF THE CITY OF INGLEWOOD et al., Defendants and Appellants.
L. A. No. 20016. 
Supreme Court of California. In Bank.  
Oct. 1, 1948.
 Ernest A. Oswald for Petitioner and Appellant.
 Clyde Woodworth and John F. Bender for Defendants and Appellants.
 SCHAUER, J.
 In this mandamus proceeding, brought against the members of the council, the clerk and the treasurer of the city of Inglewood, petitioner seeks to compel such officials to transfer out of the city's alleged "unencumbered current surplus" and into a bond redemption fund, sufficient moneys for the payment of outstanding principal and interest alleged to be due and owing on certain improvement bonds owned by petitioner. As statutory authority supporting his demands on the city officials (hereinafter termed respondents) petitioner relies upon section 12 of the Improvement Bond Act of 1915 (Stats. 1915, ch. 733, as amended by Stats. 1933, ch. 932; Deering's Gen. Laws, 1937, Act 8209, quoted, *690 post, in material parts), now found in sections 8800 through 8807 of the Streets and Highways Code. Following proceedings in the trial court which are hereinafter more fully related, respondents' demurrer to the mandamus petition was sustained without leave to amend, and judgment was entered in favor of respondents. Thereafter, on motion of petitioner which was accompanied by a proposed first amended petition, for which a "second proposed amended petition" was later substituted, the court made an order setting aside the judgment and granting leave to file the second proposed amended petition. Respondents appeal from the order so made, and petitioner cross-appeals from the judgment as first entered. We have concluded, for the reasons hereinafter stated, that the order from which respondents appeal must be reversed and that the judgment first entered should be affirmed.
 The petition for the writ was filed February 4, 1946; it is framed in two separate causes of action. In the first cause petitioner alleges that on May 3, 1926, the city of Inglewood, acting pursuant to the Improvement Bond Act of 1915, issued street improvement bonds to defray the cost of improving certain streets in the city; that petitioner owns three of such bonds, termed "Series No. 880" bonds. Attached to the complaint as an exhibit is a description of petitioner's bonds, together with statements of the principal amount of each, of interest which had accrued to July 2, 1945, at 7 per cent per annum, of the "payments heretofore made upon the matured interest and the unpaid principal and interest due upon said bonds," and of the "Balance Due" upon each bond. The exhibit shows that the principal of each bond is $1,000 and that such principal sums matured, respectively, January 2, 1934, January 2, 1935, and January 2, 1936. It is further alleged that "interest has accrued and will continue to accrue upon the principal of said bonds at the rate of 7% per annum from and after July 2, 1945, until paid"; that "all the Improvement Bonds of said several Series are now due and unpaid together with interest"; that "if there is insufficient money" in the Bond Redemption Fund to pay the "matured interest and principal" of any bonds issued pursuant to the Improvement Bond Act of 1915, then section 12 of such act makes it "the duty of the duly authorized officials" of the city "to transfer all surplus moneys in the General Fund of the City to the said Bond Redemption Fund." The petition sets forth "the amount of the unpaid assessments due in the assessment district encumbered by" petitioner's bonds *691 "and the years in which the same fell due," which are averred to be 1926 to 1936, and alleges further that "pursuant to section 3758 of the Political Code and Section 4103 of the Revenue and Taxation Code" such unpaid assessments bear certain interest and penalties; that "all of said assessments together with interest and penalties thereon are now wholly unpaid"; that a "true and accurate" auditor's report filed on October 9, 1945, in the office of the city clerk of Inglewood discloses that on June 30, 1945, the city "had an unencumbered current surplus in the amount of $301,581.57"; that on the date the petition for mandate was filed "there is an unencumbered current surplus in excess of $250,000.00 in the surplus fund of said City" which "is money in excess of all charges due or to become due in the fiscal year 1945-1946"; that such unencumbered current surplus constitutes "available funds" within the meaning of certain provisions of section 12 of the Improvement Bond Act of 1915 which are now found in section 8804 of the Streets and Highways Code.
 The second cause of action follows the allegations of the first, except that it is based upon four "Series No. 905" bonds issued by the city on August 26, 1926, to defray the cost of improving streets other than those specified in the first cause of action. The principal sum of each of these bonds, in the amount of $1,000, is alleged to have become due on January 2, 1935, and, as in count number one, the unpaid assessments are averred to have fallen due during 1926 to 1936.
 On February 21, 1946, respondents filed their demurrer to the petition, specifying two grounds: (1) That neither count states facts sufficient to constitute a cause of action against respondents or "for the issuance of a Writ of Mandate"; (2) That both causes of action "are barred by the Provisions of Sections 337, 338 and 343 of the Code of Civil Procedure ... and ... of Section 8701 of the Streets and Highways Code, formerly Section 11, Subdivision A, of the Improvement Bond Act of 1915."
 On March 8, 1946, the demurrer was overruled, and respondents given time to answer. On March 27, respondents filed their answer and on June 28, 1946, the matter was called for trial. Counsel for the respective parties made opening statements to the court; respondents then, upon the same grounds as set forth hereinabove, renewed their demurrer and objected to the introduction of any evidence; that court thereupon sustained the demurrer as to both causes of action, without *692 leave to amend, and on July 2, 1946, filed judgment to the effect that petitioner "take nothing by his Petition"; such judgment was formally entered on July 5.
 On July 17, 1946, there was filed petitioner's "Notice of Motion to Set Aside Ruling on Demurrer and for Leave to File Amended Petition for Writ of Mandate." A proposed amended petition was also filed. On July 24, 1946, the motion was argued, and denied by the court "without prejudice." On August 8, 1946, petitioner filed a "Notice of Motion to Set Aside Judgment, to Set Aside Ruling on Demurrer and for Leave to File Amended Petition for Writ of Mandate," in which it was stated that the motion would be "based upon the records and files of the above entitled action and on the points and authorities hereinafter set forth." No ground for the motion was stated. The points and authorities were addressed to the question of the running of the statute of limitations on petitioner's alleged causes of action, and also referred to those provisions of section 473 of the Code of Civil Procedure which state that the "court may, in furtherance of justice ... allow a party to amend any pleading ..." A "Second Proposed Amended Petition for Writ of Mandate" accompanied the notice of motion. On August 22, 1946, the court granted petitioner's motion. These appeals followed.
 Respondents contend:
 1. That the trial court had no power to vacate the judgment which had been entered on July 5, 1946, and grant leave to petitioner to file his amended petition.
 2. That the purported causes of action set forth in both the original and the amended petitions were barred by the provisions of sections 337 and 338 of the Code of Civil Procedure and section 8701 of the Streets and Highways Code.
 3. That the demurrer to the original petition was properly sustained for failure to state a cause of action, and that the proposed amended petitions filed by petitioner contain the same defects.
 We conclude as follows:
 [1] The Trial Court Was Without Authority, Under the Circumstances of this Case, to Vacate the Judgment Entered July 5, 1946. In support of their first contention, respondents point to the fact that petitioner makes no claim that the judgment was entered through his "mistake, inadvertence, surprise or excusable neglect" (Code Civ. Proc.,  473), or that it does not reflect the true judgment of the *693 court. Petitioner's sole argument is that his original petition for mandate did sufficiently state causes of action against respondents and that such causes were not barred by any limitations statute. It thus appears that petitioner does not dispute that in vacating the judgment the court was attempting to correct a judicial, as distinguished from a clerical, error. That it was at least error for the court to so vacate its own judgment is established by an abundance of authority. (See Estate of Burnett (1938), 11 Cal.2d 259, 262 [79 P.2d 89]; McMahan v. Baringer (1942), 49 Cal.App.2d 431, 432 [122 P.2d 63], and cases there cited; 14 Cal.Jur.  74, pp. 991-994, 999; 7 Cal.Jur. 10-Yr.Supp.  74, p. 305, and cases there cited.)
 It follows that the order vacating the original judgment must be reversed.
 [2] 2. Petitioner's Asserted Causes of Action for Mandamus Appear to be Barred by Limitations Statutes. As stated hereinabove, the petition for the writ was filed February 4, 1946. The three bonds described in petitioner's first cause of action matured, respectively, on January 2, 1934, January 2, 1935, and January 2, 1936. Those upon which his second cause of action is based matured January 2, 1935. It would thus appear, prima facie, that action upon all of the bonds was barred by section 337 of the Code of Civil Procedure, which prescribes four years as the period allowed for the commencement of "An action upon any contract, obligation or liability founded upon an instrument in writing ..." The amended pleadings which petitioner sought to file in connection with his motions to vacate the judgment entered after demurrer to the original petition was sustained without leave to amend (and which petitioner asks us to take cognizance of even though they were not before the trial court at the time it ruled on the demurrer), contain added allegations which petitioner urges would establish that the bonds were "registered" within certain provisions (see Sts. & Hy. Code,  8775) of the Improvement Bond Act of 1915 and within the provisions of the Bond and Coupon Registration Law of 1935 (Stats. 1935, p. 994 as amended; 1 Deering's Gen. Laws, Act. 881g); and he contends that thereby and therefore the limitations statutes were waived and tolled and, hence, it was prejudicial error to sustain the demurrer without leave to amend. In support of his position on this point petitioner relies upon certain language in Irvine v. *694 Bossen (1944), 25 Cal.2d 652, 658, 661 [155 P.2d 9], but in our view such language, when read in its full context, falls short of the effect invoked. Indeed, supporting respondents rather than petitioner, it is pointed out in the Irvine case that (p. 658 of 25 Cal.2d) "It is a fundamental principle in determining when the statute of limitations commences to run, that it runs from the time a cause of action accrues and it invariably accrues when there is a remedy available. (16 Cal.Jur. 488-490.)"
 In his application to this court for a hearing after decision of the District Court of Appeal (190 P.2d 226), petitioner asserts "There is now, and for some time has been, the sum of $2,236.48 in the bond redemption funds here involved. Said sum is solely applicable to petitioner's bonds; in fact, petitioner owns the only bonds outstanding ... Yet if the decision of the District Court of Appeal [affirming the judgment for respondents] is correct he is forever barred from collecting the same." It does not appear to us that petitioner's above quoted conclusion is necessarily correct; rather does it appear that petitioner is confusing the nature of this proceeding. It will be remembered that we are dealing here not with an action on the bonds to recover money from the bond redemption fund, but with a petition for mandamus whereby it is sought to compel the respondents to transfer "unencumbered current surplus" monies into the bond redemption fund. It may well be that petitioner cannot maintain this proceeding unless his pleading shows that he has a right, not barred by limitation, to recover on the bonds, because otherwise he would fail to show that he possesses a substantial interest which mandamus would protect; but a showing that action on the bonds is not barred is not the equivalent of a showing that the right, if any, to mandamus is not barred. It is with that latter right that we are here directly concerned. As mentioned previously, the unpaid assessments are alleged to have fallen due in the years 1926 to 1936 and the bonds are shown to have matured on or prior to January 2, 1936, although this proceeding was not commenced until February, 1946. The petition itself alleges that "it is the duty ... of the municipality which issued said bonds to transfer all surplus moneys in the General Fund of the City to the said Bond Redemption Fund" and that "In the event of there being no available funds in the treasury ... the tax collector shall delay the entry of the certificate of sale until such funds are available, making demand *695 in the meantime upon the City Council that a suitable amount be included in the next tax levy for the purpose of providing funds with which to make such payment," and, furthermore, that "In the event of such purchase [of land subject to an unpaid assessment] being made by the city and of any succeeding installment of such assessment or of such interest not being paid in any future year ... The city shall ... unless a resale has been made by it, from time to time when due pay and transfer into said redemption fund the amount of any such future delinquent assessment and interest pending redemption, and no redemption shall be made until any such subsequent payments, with interest and penalties, shall also be paid." No fact is averred which shows that petitioner's right to mandamus to compel the performance of official duty is any more complete now than it was during all of the years after the assessments fell due and the bonds matured. We agree with the respondents, therefore, that regardless of whether the ability to plead registration of the bonds in an amended petition would adequately meet the issue of the limitations statutes so far as concerns suit to enforce payment of the bonds from any monies which might actually be in the bond redemption funds, petitioner has failed to allege facts which would excuse the delay of some 10 years after the last unpaid assessment fell due and after the bonds matured (and some 20 years after the first unpaid assessment- installment was due) before he sought to compel the city to observe statutory provisions for paying into the redemption funds the amounts of the delinquent assessments. For aught that is alleged the now sought remedy of mandamus was at all times concerned available to petitioner, yet, as at least prima facie appears, he neglected for from 10 to 20 years to pursue it.
 For the purposes of this opinion we assume in petitioner's favor that upon the original delinquency each parcel of land subject to an unpaid assessment was sold to the city pursuant to the provisions of section 12 of the Improvement Act (see Sts. & Hy. Code,  8800, 8803; Hammond v. City of Burbank (1936), 6 Cal.2d 646, 654 [59 P.2d 495]; Wulff-Hansen & Co. v. Silvers (1942), 21 Cal.2d 253, 260-261 [131 P.2d 373]), although the petition for mandamus does not expressly so allege. Under section 12 of the act, after such a sale the city "shall pay and transfer into the redemption fund the amount of the delinquent assessment and of the delinquent *696 interest for which the property is sold" (Sts. & Hy. Code,  8802). "If there are no available funds in the treasury with which to ... pay ... the amount of the delinquent assessment and interest for which the property was sold" then it becomes the duty of the city to levy a tax of not exceeding 10 cents on each $100 of assessable property "for the purpose of providing funds with which to make such payment." Thereafter "the city shall, unless a resale has been made by it, from time to time when due pay and transfer into the redemption fund the amount of any future delinquent installments of the assessment and interest thereon pending redemption." (See  12, 16 of the act; Sts. & Hy. Code,  8804, 8806, 8809; American Co. v. City of Lakeport (1934), 220 Cal. 548, 562-565 [32 P.2d 622]; Hammond v. City of Burbank (1936), supra, 6 Cal.2d 646, 657.) "Available funds" from which the city may make the payments of the purchase price and of subsequent unpaid assessments of land sold to the city have been defined as surplus monies remaining in the city's general fund "over and above the governmental liabilities incurred" in a particular fiscal year. (See Hammond v. City of Burbank (1936), supra, 6 Cal.2d 646, 662; Kerr G. Mfg. Corp. v. San Buenaventura (1936), 7 Cal.2d 701, 707 [62 P.2d 583].)
 [3] The law is settled that the city may be compelled by mandamus to make the limited tax levy for the purpose of meeting the original purchase price of lands sold to it for delinquent assessments. (See Kerr G. Mfg. Corp. v. San Buenaventura (1936), supra, 7 Cal.2d 701, 706, and cases there cited.) And, as noted in Hammond v. City of Burbank (1936), supra, 6 Cal.2d 646, 661, it was intimated in the Lakeport case (supra, 220 Cal. 548, 565) that the city may "be compelled to transfer surpluses to the bond redemption fund for the purposes of carrying out the city's obligations under section 12." Assuming, therefore, for the purposes of this opinion without deciding, that "in any year if there is a surplus ... the bondholders can compel by mandamus a transfer of that surplus to the bond redemption funds for the purposes specified in section 12" (cf., Hammond v. City of Burbank (1936), supra, 6 Cal.2d 646, 662, 663; Kerr G. Mfg. Corp. v. San Buenaventura (1936), supra, 7 Cal.2d 701, 707), nevertheless petitioner has not in any of his proposed petitions set forth facts which would excuse his long delay in seeking to compel the city to act. He nowhere avers, nor does he claim that he is able to aver, that surpluses *697 sufficient to meet his bond requirements were not available from year to year for more than four years after maturity of such bonds and before this proceeding was commenced. Indeed, from petitioner's statements in his petition to this court for a hearing it appears inferentially that he is not in a position to claim that he could amend to show that at no earlier time was mandamus available to him. As previously mentioned, he asserts that there "is now, and for some time has been, the sum of $2,236.48 in the bond redemption funds here involved" and that "petitioner owns the only bonds outstanding." As it appears from the petition that other bonds were originally issued it is a reasonable inference, since they are no longer outstanding, that funds were from time to time available to pay them and that they have been paid. There is no allegation of facts to show that funds to pay petitioner's bonds were not earlier available or that the now sought remedy of mandamus was not as fully available more than four years before this proceeding was commenced as it was on the date of filing.
 [4] It is established in this state that a mandamus proceeding is barred if not commenced within the period prescribed by the limitations statutes and that the limitation begins to run when the right first accrues. (See Code Civ. Proc.,  1109, 363, 337, 343; W. R. Grace & Co. v. California Emp. Com. (1944), 24 Cal.2d 720, 728-729 [151 P.2d 215]; Dillon v. Board of Pension Commrs. (1941), 18 Cal.2d 427, 429-430 [116 P.2d 37, 136 A.L.R. 800]; Hermanson v. Board of Pension Commrs. (1933), 219 Cal. 622, 625 [28 P.2d 21].) In this proceeding to compel the city to perform its asserted duty to transfer surplus monies to the bond redemption funds the applicable period is, at most, four years. (Irvine v. Bossen (1944), supra, 25 Cal.2d 652, 663; Barnes v. Glide (1897), 117 Cal. 1, 7 [48 P. 804, 59 Am.St.Rep. 153].) As noted hereinabove, the allegedly delinquent assessments fell due from 10 to 20 years prior to the filing to the petition herein and the bonds themselves matured more than 10 years before the proceeding was commenced. And as also previously stated, petitioner has in neither his original petition nor either of his proposed amended petitions alleged facts excusing the delay in seeking to compel the city to pay the delinquent amounts into the bond redemption funds or otherwise tolling the statute. It follows that petitioner has not established the abuse of discretion which he charges the trial court *698 committed in originally sustaining the demurrer to his petition without leave to amend (see Code Civ. Proc.,  472c), and in entering the judgment of dismissal. Therefore the judgment must be affirmed. By reason of our conclusion on this point, it becomes unnecessary to discuss the other contentions of the respective parties.
 The order from which respondents appeal is reversed and the judgment from which petitioner appeals is affirmed.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., and Spence, J., concurred.
 EDMONDS, J.
 I concur in the conclusion that the trial court had no authority to vacate the judgment entered upon an order sustaining the respondents' demurrer without leave to amend. But I do not join in the determination that the judgment should be affirmed because the "petitioner's asserted cause of action for mandamus appears to be barred by limitations statutes."
 The grounds of demurrer were that the petition does not state sufficient facts to constitute a cause of action and that the cause of action, if any, is barred by the statute of limitations. Although the trial court in sustaining the demurrer did not announce the basis of its decision, all of the authorities cited and the amendments to the petition presented in the subsequent attempt to have the judgment vacated were directed solely to the issue of the statute of limitations.
 The majority opinion states the two issues regarding the application of the statute as being: (1) whether it constitutes a bar to petitioner's claim on the bonds and thereby prevents him from having such interest as entitles him to maintain a proceeding in mandate; and, (2) whether the statute directly bars the right to the remedy of mandate, regardless of its effect upon an action on the bonds. The parties directed their briefs primarily to the first proposition. The basic issue presented in that regard is whether certain endorsements made on the bonds are sufficient to constitute such "registration" of them as to toll the statute. The position of the petitioner upon this issue is not fairly met by the majority opinion. No discussion is given to the statutes involved nor to the arguments presented by the petitioner, and the point is disposed of by stating: "In support of his position ... petitioner relies upon certain language in Irvine v. Bossen ..., but in our view such language, when read in its full *699 context, falls short of the effect invoked." This certainly is not a holding that the petitioner could not have amended his petition to show registration of the bonds. If, as the opinion states, the petition shows "prima facie, that the action upon the bonds was barred," that conclusion concerns only the question of whether the demurrer should have been sustained, and does not determine whether it properly could have been sustained without leave to amend. Upon this latter point there is no decision.
 Otherwise stated, the majority opinion holds that because the petition does not show, as against a demurrer, that the petitioner may maintain an action upon the bonds, the mandate proceeding may not be maintained because the statute of limitations is a bar to a recovery of the indebtedness. This conclusion is correct only if it is based upon a determination that the petitioner could not amend his petition to state a cause of action upon his bonds, and the court leaves that question undecided.
 In considering the second issue concerning the statute of limitations, the opinion declares: "It may well be that petitioner cannot maintain this proceeding unless his pleading shows that he has a right, not barred by limitation, to recover on the bonds, because otherwise he would fail to show that he possesses a substantial interest which mandamus would protect; but a showing that action on the bonds is not barred is not the equivalent of a showing that the right, if any, to mandamus is not barred. It is with that latter right that we are here directly concerned." (Emphasis added.) And again: "We agree with the respondents, therefore, that regardless of whether the ability to plead registration of the bonds in an amended petition would adequately meet the issue of the limitations statutes so far as concerns suit to enforce payment of the bonds from any monies which might actually be in the bond redemption funds, petitioner has failed to allege facts which would excuse the delay" in bringing mandate. (Emphasis added.) The sole ground of the decision, therefore, is that, even if the petition could have been amended to state a cause of action upon the bonds, the statute of limitations bars the right to require the transfer to the bond redemption fund of an amount sufficient to meet the unpaid principal and interest.
 The opinion notes that "petitioner has failed to allege facts which would excuse the delay" (emphasis added); *700 "[f]or aught that is alleged the now sought remedy of mandamus was at all times concerned available"; and "[h]e nowhere avers, nor does he claim that he is able to aver" such facts. These statements assume that there is an affirmative duty upon the petitioner to negative the statute of limitations. To the contrary, the statute is a matter of defense normally to be raised by answer, and only available upon demurrer when the pleader has alleged facts from which it affirmatively appears that the action has not been commenced within the time fixed by statute.
 "A demurrer reaches only matters appearing upon the face of the pleading to which it is directed, and it must be determined upon the allegations of such pleading without speculation on what might have happened or what might not have occurred. ... Accordingly, the defense of the statute of limitations cannot be urged by demurrer, unless it clearly appears from the complaint that the plaintiff's cause of action is barred." (21 Cal.Jur. [Pleading,  61] 94-95.)
 For all that appears in the petition, there has not been "unencumbered current surplus" monies in the city treasury at any time prior to 1945. I, therefore, see no basis for barring the petitioner's right to demand a transfer of such money to the bond redemption fund in the absence of allegation of facts by the petitioner showing that the statute of limitations is applicable.
