
107 Cal.App.2d 656 (1951)
DONALD A. BATES, Petitioner,
v.
SUPERIOR COURT OF SAN DIEGO COUNTY et al., Respondents.
Civ. No. 4291. 
California Court of Appeals. Fourth Dist.  
Nov. 21, 1951.
 Augustine, Bryans & Champion and C. H. Augustine for Petitioner.
 James Don Keller, District Attorney, and Claude B. Brown, Deputy District Attorney, for Respondents.
 GRIFFIN, J.
 Petitioner, Donald A. Bates, filed this petition (after denial of motion made under Pen. Code,  995) to test the question of the sufficiency of the evidence taken at the preliminary hearing and to determine whether the information was found without reasonable or probable cause.
 Petitioner, the alleged passive agent, and one Andrew M. Herman, the alleged active agent, were jointly charged with the crime of sex perversion under section 288a of the Penal Code. They were duly arraigned and their preliminary hearing was set for September 19, 1951. Both defendants were present at that time and were represented by separate counsel. It appears from the petition that counsel for petitioner, prior to the preliminary hearing, was assured by the deputy district attorney that if petitioner would offer himself as a witness against his codefendant he would move to dismiss the complaint. *657 Under these circumstances the police officers were sworn and examined at the hearing and testified generally as to the acts they saw, which testimony did indicate reasonable grounds for holding both defendants to the superior court. Counsel for petitioner waived any cross-examination of the witnesses. Thereupon, the People called petitioner "under sec. 1099 of the Penal Code." Some discussion followed. Counsel for the codefendant remarked: "This section 1099 seems to contemplate some action on the part of the court. The district attorney probably wants to make an application that the court has to rule upon." The deputy district attorney then said: "If the court please, the people will ask that the complaint be dismissed against the defendant" (Bates) "so that he may be a witness for the People." The court responded: "Under 1099 the application is granted." Thereafter, the court remarked: "The court is a little surprised that the District Attorney feels that it is necessary to take this action, these steps at this time, in view of the record, but I am going to grant the application." The petitioner Bates then said: "Just what does that mean?" And his counsel replied: "The motion was to dismiss as against Donald Bates in order that he may become a witness and the court granted that motion." "The Court: Yes, with the observation of the court that I am somewhat surprised that the District Attorney feels it is necessary to make such application at this time in view of the record. ... You may proceed."
 The petitioner then testified against his codefendant. Thereafter, the committing magistrate stated that "after thinking it through" he questioned his authority to dismiss the action against petitioner under section 1099 of the Penal Code. However, he stated that the record did show that he had dismissed the action against petitioner. The record further shows that after petitioner testified the court did, on his own motion "reverse the decision" and held the petitioner and his codefendant to answer to the superior court. The deputy district attorney remarked that he could "not conscientiously" ask for a bindover as to petitioner.
 [1, 2] At the preliminary hearing counsel for petitioner made the same argument as he does here on this appeal, i. e., that after the magistrate granted the motion to dismiss, as appears by the record, there was no case pending against the petitioner; that petitioner acted upon the knowledge that the action against him had been dismissed, and upon information that his counsel gave him that if he would so testify the case *658 would be dismissed; that accordingly petitioner has suffered prejudice by virtue of the claimed reversal of such decision; that the reinstatement of the charges against him after the dismissal was entered and after he had testified under such a promise was unauthorized by law; that the committing magistrate's actions in so doing were a violation of petitioner's constitutional rights; and that accordingly, there was no valid and existing complaint against petitioner at the time he was purportedly held to answer to the superior court.
 We are in accord with the general principles set forth in the argument. (People v. Walther, 27 Cal.App.2d 583 [81 P.2d 452]; In re Critchlow, 11 Cal.2d 751 [81 P.2d 966]; People v. Dillon, 68 Cal.App. 457 [229 P. 974]; Cal. Const., art. I,  13; Ex parte Clarke, 103 Cal. 352, 354 [37 P. 230].) This is not a case which questions the power of the court to cause its records to correctly set forth the orders which it had actually made or which it had made through inadvertence or mistake. The facts here recited show that the committing magistrate had no authority under the law to set aside its previous order. (Holtum v. Grief, 144 Cal. 521, 524 [78 P. 11]; Carpenter v. Pacific Mutual Life Ins. Co., 14 Cal.2d 704 [96 P.2d 796]; Stevens v. Superior Court, 7 Cal.2d 110, 112 [59 P.2d 988].)
 Whether or not a dismissal may be authorized by a committing magistrate under section 1099 of the Penal Code, as it then read, may be open to question. (People v. Indian Peter, 48 Cal. 250; Ex parte Stice, 70 Cal. 51 [11 P. 459]; see amendment 1951 to section 1099 Penal Code.) Nevertheless, the committing magistrate, upon motion of the prosecuting attorney, had an inherent right and power to dismiss any such complaint. (People v. Ward, 85 Cal. 585 [24 P. 785]; 22 C.J.S. p. 467,  316; 8 Cal.Jur. 664,  630.) Accordingly, there was no proceeding pending against petitioner at the time he was allegedly held to answer to the superior court, and the committing magistrate was without jurisdiction to further act in the matter after granting the motion to dismiss.
 The writ of prohibition will issue as prayed for in the petition.
 Barnard, P. J., and Mussell, J., concurred.
