
13 Cal.App.2d 696 (1936)
JOE ERGANIAN, Respondent,
v.
MARY C. BRIGHTMAN, Appellant.
Civ. No. 10488. 
California Court of Appeals. Second Appellate District, Division One.  
May 8, 1936.
 Paul Barksdale D'Orr and Thomas A. Reynolds for Appellant.
 Newton M. Todd and Fred A. Watkins for Respondent.
 Roth, J., pro tem.
 Prior to the year 1932, plaintiff and respondent herein was the owner of a lot in Long Beach, improved with a one-story building. He had borrowed $16,000 from a bank, giving his promissory note therefor and executing a mortgage on said property in favor of the bank to secure the note. Erganian was unable to meet the note when it fell due in 1932, whereupon the bank instituted foreclosure proceedings, and, pursuant to a judgment obtained therein, did on April 15, 1932, cause the sheriff to sell said property under the decree of foreclosure to satisfy the indebtedness. The property was purchased at the foreclosure sale by Mary C. Brightman, defendant and appellant herein. Before and after the sale, Erganian occupied one of the storerooms on the property in which he conducted a second-hand business. After the purchase of said property by appellant, Erganian remained in possession. Failing to collect rent from him, after repeated efforts to do so, appellant *698 instituted an unlawful detainer action against Erganian, and upon his default in said action obtained judgment for the possession of the premises and $525 damages. Said judgment was entered on July 28, 1932. Execution was issued on said judgment within a few days thereafter, and a Ford automobile and certain other personal property belonging to Erganian were levied upon to satisfy the money feature of the judgment. On August 1, 1932, the sheriff placed appellant in the possession of the premises, theretofore occupied by Erganian, under a writ of assistance issued pursuant to the judgment in said unlawful detainer case. On May 22, 1933, a motion was made to vacate the judgment in the unlawful detainer case, Erganian contending that the judgment was void on its face, because the municipal court of the city of Long Beach had exclusive jurisdiction of the amount involved in the unlawful detainer suit, and that the superior court in which the unlawful detainer action was tried had no jurisdiction to try the same or enter a judgment therein. The default judgment was vacated pursuant to such motion. An appeal was taken by Mrs. Brightman from the order vacating said judgment, which appeal was dismissed on March 24, 1934.
 Thereafter on April 18, 1934, Erganian instituted an action in the superior court, hereinafter referred to as "first" action. The complaint in this first action alleged that Erganian was the owner and in the possession of the premises described in the unlawful detainer action, and that the sheriff at the direction of Mrs. Brightman wrongfully trespassed and entered upon said premises and ejected Erganian therefrom and turned the possession of the same over to Mrs. Brightman; that, as a consequence thereof, Erganian had been unable to sell the property and preserve such equity as he may have had therein, and suffered mentally and physically, all to his damage. Further, that, by reason of the fact that Mrs. Brightman, pursuant to the writ of execution issued on the void judgment in the unlawful detainer action, had sold certain personal property located on the premises, he suffered further damage. Thereafter, on May 1, 1934, Mrs. Brightman filed a general demurrer to said complaint and each cause of action thereof, which demurrer was sustained. Erganian failed to amend within the time allowed, whereupon, on May 28, 1934, judgment *699 was entered upon the order sustaining the demurrer, "that plaintiff take nothing by his action, and that said action be, and it is hereby dismissed". This judgment became, and is now, final. Thereafter, on July 21, 1934, plaintiff filed his complaint in the instant action (which will hereinafter be referred to as "present action), in which complaint Erganian set up two causes of action, the first for malicious prosecution and the second, predicated upon the same facts as are set up in the first action, stating in addition that when Mrs. Brightman levied execution, pursuant to the void judgment in the unlawful detainer suit, she "knew that said judgment was void ... and in securing said execution and causing plaintiff to be ejected from said premises and said property to be sold, as above set forth, defendant acted in bad faith and with malice and without probable cause or any cause and for the purpose of securing the possession of said premises and said personal property and preventing plaintiff from selling, refinancing or redeeming said real property"."
 Mrs. Brightman in answering this complaint set up as a second defense in her answer the proceedings in the first action and the final judgment entered therein, and at the trial of the present action, Mrs. Brightman argued that all of the matters contained in the present action had been adjudged and concluded against Erganian by the judgment in the first action, and placed in evidence the judgment roll in said first action. Upon the completion of Erganian's case in the present action, a motion for nonsuit was made and granted as to the first cause of action and denied as to the second, which second cause of action went to the jury. A verdict of $3,800 was returned, and this appeal is from the judgment entered upon said verdict.
 The decisive question presented is, was the judgment of dismissal in the first action a bar to the second cause of action in the present action? We think it was.
 [1] That a final judgment upon an order sustaining a general demurrer constitutes res judicata as to the matters pleaded in the complaint demurred to is not open to debate. The rule and the limitations thereon are correctly stated in 15 California Jurisprudence, page 126, as follows:
 "While a judgment upon demurrer is of course conclusive in subsequent actions between the parties as to those matters *700 which it actually adjudicates, it may or may not operate as a bar, depending upon whether the subsequent action was upon the same cause of action or claim, and whether the circumstances of the first case were such as to make the judgment one on the merits of the claim. If either of those conditions is lacking, the judgment is not a bar. ... And a judgment upon the sustaining of a demurrer to the complaint for failure to state a cause of action is a bar to a subsequent action setting up the same facts. But if the facts are materially varied in the second case, or if an essential fact missing in the first complaint is supplied in the second, the former judgment is not a bar."
 [2] A judgment upon an order sustaining a demurrer constitutes a trial on the merits when an issue of law raised by the demurrer is heard and ruled upon by the court. If leave to amend is granted, it must be taken advantage of, and if it is not, a plaintiff finds himself in the same position as if demurrer were sustained without leave to amend. (City of Pasadena v. Superior Court, 212 Cal. 309, 314 [298 P. 968]; Goldtree v. Spreckels, 135 Cal. 666 [67 P. 1091]; Litch v. Kerns, 8 Cal.App. 747 [97 P. 897]; Hardy v. Hardy, 97 Cal. 125 [31 P. 906]; City of Los Angeles v. Mellus, 58 Cal. 16; Peterson v. Weissbein, 75 Cal. 174 [16 P. 769]; McMickens v. McMickens, 220 Cal. 731 [32 PaCal.2d 597].)
 [3] The allegations of the first action are meticulously set forth, in comparison with those of the second cause of action in the present action, in appellant's brief, and the only distinction apparent is the pleaded evidentiary fact or conclusion which is excerpted in our statement of facts, to-wit, that the wrong alleged in the second cause of action was caused by, or arose out of, the abuse of the process of the court in levying a writ of execution on a void judgment.
 [4] It would have been impossible to prove a trespass on the facts alleged in the first action without proving the same thing. The allegation as to the means whereby the trespass was accomplished was a probative fact and added nothing to the ultimate facts pleaded, either in the first action or in the present action. (Gomez v. Reed, 178 Cal. 759 [174 P. 658]; Strohlburg v. Jones, 78 Cal. 381 [20 P. 705]; Demartin v. Albert, 68 Cal. 277 [9 P. 157].) *701 In the case of Hardy v. Hardy, 97 Cal. 125, the court says at page 131 [31 P. 906]:
 "The same evidence which the plaintiff would have introduced to establish the allegations of her complaint in the former action was essential to establish those of the present complaint."
 The identic nature of the evidence which must be used is frequently employed as a test to determine the identicity of causes of action. It is apparent to us, from a scrutiny of the allegations of the first action and those of the present action, that the evidence used to establish either must be the same. It follows, therefore, that the judgment must be, and it is, hereby reversed, and the trial court is directed to enter a judgment for defendant and appellant.
 Houser, P. J., and Doran, J., concurred.
