
137 Cal.App.2d 728 (1955)
ARLEY MUNS, Petitioner,
v.
THE SUPERIOR COURT OF SUTTER COUNTY, Respondent.
Civ. No. 8810. 
California Court of Appeals. Third Dist.  
Dec. 12, 1955.
 Hewitt & McBride for Petitioner.
 Edmund G. Brown, Attorney General, Doris H. Maier, Deputy Attorney General, and John G. Hauck, District Attorney, for Respondent.
 VAN DYKE, P. J.
 This proceeding is in prohibition. The petitioner seeks to restrain the respondent superior court from trying him under an information charging violation of section 502 of the Vehicle Code, with a prior conviction. *730
 On December 14, 1954, there was filed in the Justice Court of the Yuba Judicial District in Sutter County, a complaint charging petitioner with violation of said section, with no charge of a prior. Petitioner entered a plea of not guilty, demanded a jury trial, and a trial date was set. Thereafter, and before the date of trial, a document entitled "Amended Complaint" was filed charging the same violation and alleging a prior conviction. Thereby the cause became triable in the superior court. After the filing of this document, the justice court set a preliminary hearing on the same for January 13th. Prior to the preliminary hearing the original complaint filed December 14th, as aforesaid, was, at the request of the district attorney, ordered "dismissed." The judge of the justice court, sitting as a magistrate, proceeded with the preliminary hearing and at the close thereof ordered that the petitioner herein be held for trial in the superior court. Thereafter an information was filed charging the same violation, with prior conviction. Motion to discharge the defendant was denied and this proceeding followed.
 It is the contention of petitioner that by the order made, which purportedly dismissed the original complaint, there was accomplished a dismissal of the action and that by the provisions of section 1387 of the Penal Code that dismissal stands as a bar to any other prosecution for the same offense.
 The docket entries in the Justice Court read as follows:
 "Dec. 14 Complaint filed charging a misdemeanor. Defendant appeared in Court was informed as to his rights. Defendant entered a plea of not guilty and demanded a trial by jury. Trial was set for January 12, 1955 at 10 A.M. Defendant posted bail of $211.00 and was released."
 "Jan. 3 It being brought to the attention of the Court that the defendant had suffered a prior conviction for this violation, the above proceedings are hereby set aside and the Dist. Atty is preparing an amended Complaint charging him with a prior conviction."
 "Jan. 7 Prel. date 1-13-55 at 3:30 P. M."
 "Jan. 5 Amended Complaint filed charging a high misdemeanor Sect. 502 CVC Code with a prior conviction."
 "Jan. 10 Subpoena issued, Perkins, Bumpus, Savana"
 "Jan. 13 Preliminary came on at 3:30 P. M. Dist. Atty. John Hauck represented the People--Atty. Loyd E. Hewitt represented the defendant. Hollan Jones was sworn in as Reporter. Yuba City Police Officer Neil R. Perkins was sworn and testified. The prosecution rested. The defense *731 offered no witnesses. The Defendant was ordered held to answer and to appear in the Superior Court on Friday Jan. 21, 1955, at 9:30 A. M. for arraignment. Bail transferred to Co. Clerk Ck # 226. Prior to the preliminary the original Complaint filed Dec. 14, 1954 was at the request of the District Attorney ordered dismissed."
 Section 1387 of the Penal Code provides: "An order for the dismissal of the action, made as provided in this chapter, is a bar to any other prosecution for the same offense, if it is a misdemeanor. ..." Petitioner's contention that by what was done the action was dismissed cannot be sustained.
 Although the docket does not record the proceedings of the court with all the nicety that would have been desirable, yet, given a fair construction, it does not warrant holding that there was a dismissal of the action. [1] It shows that the court had been informed that the defendant had suffered a prior conviction and that the district attorney was preparing to file an amended complaint to allege the prior. The legal effect of such an amendment would be to oust the justice court of trial jurisdiction, would render nugatory the proceedings following the filing of the original complaint, that is, the plea, the demand for trial by jury and the order setting the cause for trial before that court, and would require a preliminary hearing to determine whether or not defendant should be held for superior court action. With this in mind the court formally set aside such prior proceedings. Thereafter the expected amended pleading was filed. [2] The docket further shows that when the defendant next appeared on the date set for the preliminary, and before the preliminary was begun, the district attorney requested that "the original Complaint filed Dec. 14, 1954" be ordered dismissed. This order was made. This, however, could not effect the dismissal of the action. Such a construction of the docket would fly in the face of a number of circumstances apparent from the record. Thus, after the order was made, the judge of the justice court sitting as a magistrate, held the preliminary hearing and at its conclusion ordered the petitioner held for trial in the superior court. Although acting in two different capacities, it is clear that the official did not consider that the action itself had been dismissed. Again the district attorney did not ask that the action be dismissed but that the "original complaint" be dismissed and such was the form of the order. The use of the descriptive term "original" shows that the district attorney was not addressing his motion to the action *732 itself nor to the existing pleading, that is, the amended complaint. [3] After the filing of the amended pleading, the original complaint was no longer a pleading in the case, and it could not be "dismissed." The amended pleading superseded it and it had no further function as a pleading. (O'Brien v. O'Brien, 50 Cal.App.2d 658, 661 [123 P.2d 877]; Owens v. Traverso, 125 Cal.App.2d 803, 808 [271 P.2d 164]; Puchta v. Rothman, 99 Cal.App.2d 285, 291 [221 P.2d 774]; 21 Cal.Jur. p. 213,  146; 42 C.J.S. "Indictments and Informations, p. 1248,  239; Woodsmall v. State, 89 Ind.App. 617 [167 N.E. 631].) The order of the justice court purporting to dismiss the "original complaint" was a nullity. The action of the district attorney, followed by the order of the court "dismissing," or purporting to dismiss, the "original complaint," cannot be given the force and effect of a dismissal of the action."
 [4] It is argued that, since the complaint could not be amended after plea without the permission or an authorizing order of the court that it be so amended (Pen. Code,  1008, 1009; People v. Brower, 92 Cal.App.2d 562, 564 [207 P.2d 571]), and since the record does not show such permission, the filing of the amended complaint was a nullity. This argument calls for an unwarrantably strained construction of the record. We think permission must be implied. The docket states: "It being brought to the attention of the court that the Defendant had suffered a prior conviction for this violation, the above proceedings are hereby set aside and the Dist. Atty is preparing an amended Complaint charging him with a prior conviction." Within two days thereafter the amended complaint was filed. We hold it was filed with permission of the court and that the docket sufficiently shows this to be so.
 For the reasons given, petitioner is not entitled to a writ of prohibition and the superior court had jurisdiction to proceed with the trial of the action.
 The alternative writ heretofore issued is discharged. The peremptory writ is denied.
 Peek, J., and Schottky, J., concurred.
