
34 Cal.App.3d 63 (1973)
109 Cal. Rptr. 661
THE PEOPLE, Plaintiff and Appellant,
v.
EUGENE AUGUSTUS FLEMMINGS, Defendant and Respondent.
Docket No. 22420.
Court of Appeals of California, Second District, Division Four.
August 28, 1973.
*65 COUNSEL
Joseph P. Busch, District Attorney, Harry Wood and Robert J. Lord, Deputy District Attorneys, for Plaintiff and Appellant.
Richard S. Buckley, Public Defender, Harold E. Shabo, Allen Adashek and Richard A. Curtis, Deputy Public Defenders, for Defendant and Respondent.
OPINION
FILES, P.J.
By information defendant was charged with possession of heroin for sale (Health & Saf. Code, § 11500.5, now § 11351). Upon a motion made under Penal Code section 995, the superior court set aside the information upon the ground that the defendant had not been legally committed by a magistrate.
The People are appealing from that order.
The basis of the superior court's ruling was that during the preliminary examination, the arresting officer had refused to give the name of his informant, who may have been a material witness, and the magistrate had failed to conduct a special hearing under Evidence Code section 1042 to determine whether the unidentified person was a material witness.
Counsel for defendant seek to uphold that decision upon the principle applied in the trial courts that where the prosecution stands on its privilege to withhold the identity of a witness material to the issue of guilt, the defendant is entitled to a dismissal of the charges. (See People v. McShann (1958) 50 Cal.2d 802, 808 [330 P.2d 33]; People v. Garcia (1967) 67 Cal.2d 830, 836 [64 Cal. Rptr. 110, 434 P.2d 366]; Honore v. Superior Court (1969) 70 Cal.2d 162, 168 [74 Cal. Rptr. 233, 449 P.2d 169].)
The evidence at the preliminary examination consists of the testimony of a single police officer, plus certain stipulations of facts. Officer Levin testified he had received information that a man known as "Blackie" was dealing in narcotics at an apartment at 4120 1/2 South Central. The officer followed Blackie from the apartment to a gas station at 54th and Central where, according to the officer's information, a narcotics transaction was to take place. At the station Blackie stepped out of his car and loitered in front of the men's room of the station for about 15 minutes. Defendant then arrived. The two acknowledged each other's presence and entered the men's room together. When the two came out of the restroom, Officer *66 Levin, with his gun in his hand, ordered them to freeze. At that, defendant dropped a blue plastic bag.
The blue bag contained 21 small balloons, each of which contained a white powder. It was stipulated that this powder contained heroin.
In cross-examining Officer Levin at the preliminary, defendant's attorney asked the name of the informant. The officer declined, claiming privilege. (See Evid. Code, § 1041.) He testified "If I reveal this informant's name it could result in his death." Further questions regarding the informant were objected to by the prosecutor, and the objections were sustained. Defendant made a motion to dismiss on the ground that he was "precluded from finding out whether he is a material witness on the issue of guilt or innocence." That motion was denied.
Penal Code section 995 authorizes the superior court to set aside an information upon either of two grounds. They are:
"1. That before the filing thereof the defendant had not been legally committed by a magistrate.
"2. That the defendant had been committed without reasonable or probable cause."
Here there is no question of the sufficiency of the evidence to show probable cause. The issue here is whether the record supports the superior court's view that "the defendant had not been legally committed."
"The scope of the phrase `legally committed,' as used in section 995, has frequently been interpreted by the courts. (See Jennings v. Superior Court, 66 Cal.2d 867, 874-875 [59 Cal. Rptr. 440, 428 P.2d 304], and cases cited therein.) The rule which has evolved from these cases is that where evidentiary inquiry during the course of a preliminary examination establishes that the defendant has been deprived of a substantial right, the commitment is unlawful and the deprivation may be asserted through a motion to set aside the information under section 995." (People v. Wright (1969) 2 Cal. App.3d 732, 735 [82 Cal. Rptr. 859].) (Italics in original.)
In Mitchell v. Superior Court (1958) 50 Cal.2d 827 [330 P.2d 48], a narcotics possession and sale case, the magistrate had refused to require disclosure of the identities of informers who were material witnesses. The superior court had denied defendants' motions to set aside the information, and the defendants were seeking a writ of prohibition to prevent their trial. In denying the writ the Supreme Court said (at pp. 829-830): "A defendant is entitled at his trial to ascertain on cross-examination the name of an *67 informer who is a material witness on the issue of guilt.... The reasons that require disclosure at the trial also require disclosure at the preliminary hearing, for the defendant has the right at such hearing to cross-examine the prosecution's witnesses (Pen. Code, § 865) and to produce witnesses in his own behalf (Pen. Code, §§ 864, 866). The exercise of these rights at the preliminary hearing may enable the defendant to show that there is no reasonable cause to commit him for trial and thus to avoid the degradation and expense of a criminal trial.
"... It does not appear that disclosure of the names of the informers was demanded to enable defendants to discredit the prosecution's evidence at the preliminary hearing or that they wished to use the informers as witnesses at that hearing.... The value to defendants of disclosure is that it might enable them to obtain information useful in their defense at the trial.... Since there was competent evidence to justify committing defendants and disclosure of the names of the informers can be obtained at the trial, defendants were not prejudiced by the error or deprived of any substantial right. (See Pen. Code, § 1404.)"
The Mitchell case differs from this case in its procedural setting: In Mitchell the defendant was seeking a writ of prohibition to prevent a trial after the superior court had refused relief; here the superior court granted relief and the People are appealing from the ensuing dismissal. (1) Though under some circumstances a superior court might be justified in setting aside an information under circumstances which would not justify an appellate court in doing so by writ of prohibition,[1] we think the standard applicable here is that discussed in the Mitchell opinion  that is, whether the defendant was prejudiced or deprived of a substantial right at the preliminary examination.
(2) The rule that the prosecution must, on demand, disclose the identity of a material witness is not simply a rule of procedure, but a principle of fairness which the courts have insisted upon. (See Roviaro v. United States (1957) 353 U.S. 53 [1 L.Ed.2d 639, 77 S.Ct. 623]; People v. McShann, supra, 50 Cal.2d at pp. 807-808.)
Evidence Code section 1042, which became effective in 1967, provides rules for implementation of the judicially declared policy that disclosure *68 will be required where necessary for a fair hearing. The test applied in Mitchell for ordering an information set aside is similar  that is, whether defendants were prejudiced at the preliminary hearing. We therefore conclude that the reasoning of Mitchell is applicable here in determining whether the superior court should have set aside the information.
We therefore turn to the question whether the record shows any prejudice to defendant in the manner in which the preliminary examination was conducted.
(3) The law is now settled that a defendant is not entitled to a disclosure of the identity of an informant whose testimony would be material only on the issue of probable cause to arrest. (See Evid. Code, § 1042, subd. (c); Martin v. Superior Court (1967) 66 Cal.2d 257 [57 Cal. Rptr. 351, 424 P.2d 935].)
(4) The right to disclosure arises in the trial court "when defendant demonstrates a reasonable possibility that the anonymous informant whose identity is sought could give evidence on the issue of guilt which might result in defendant's exoneration." (People v. Garcia, supra, 67 Cal.2d at p. 840.)
The Mitchell opinion, supra (50 Cal.2d at pp. 829-830), points out two legitimate reasons for disclosure at the preliminary examination: (1) to show there is no reasonable cause to commit, and thus avoid a trial, and (2) to prepare for trial.
In the case at bench the evidence showed that defendant was carrying in his hand a blue plastic bag containing heroin, which he dropped when confronted by the police. In the face of such evidence, defendant could hardly hope to escape being committed for trial, regardless of what countershowing he might have made. Defendant did not offer any evidence at the preliminary, and his counsel did not suggest that he had any intention to put on a defense in the magistrate's court. This is not a case like Jennings v. Superior Court (1967) 66 Cal.2d 867 [59 Cal. Rptr. 440, 428 P.2d 304], where the defendant was refused the opportunity to controvert the People's evidence at the preliminary.
Resourceful counsel for defendant now point out in their brief that defendant might have a defense notwithstanding the compelling evidence against him. He might have been the victim of entrapment, or he might have been inveigled into holding the package without criminal intent. But no such theory of defense was hinted at during the preliminary examination.
In analyzing the possibility of prejudice, it is worth noting that the *69 hypothetical defense mentioned by counsel in this appeal would have been known to the defendant, and to his counsel, before the preliminary examination if it had any basis in fact. They were, of course, under no obligation to disclose what they knew, but what is significant is that nothing in the record of the preliminary gives any indication that they were thinking of putting on such a defense at that time.
(5) Upon this record, it seems not reasonably possible that defendant was precluded by the magistrate's ruling from putting on a defense at the preliminary examination. His purpose was discovery, for possible use at the trial. His grievance, at the preliminary, as he there expressed it was "I am precluded from finding out whether he is a material witness on the issue of guilt or innocence."
It is clear, therefore, that defendant was not prejudiced or deprived of a substantial right affecting the legality of his commitment. If he is entitled to disclosure, his remedy now is a motion in the superior court, where, pursuant to Evidence Code section 1042, subdivision (d), evidence can be received on that issue.
Finally, we point out that we are not approving the conduct of the magistrate in refusing to hear and consider the defendant's demand for disclosure during the preliminary examination. The Supreme Court has held that during the preliminary, a defendant is entitled to identification of an informer who is a material witness on the issue of guilt. (See Mitchell v. Superior Court, supra, 50 Cal.2d at p. 829; People v. Goliday (1973) 8 Cal.3d 771, 779, 782 [106 Cal. Rptr. 113, 505 P.2d 537].) Our holding here is simply that the failure of the magistrate to consider the matter did not, upon the facts of this case, make the preliminary unfair in such a way as to require that the information be set aside.
The order is reversed.
Jefferson, J., and Kingsley, J., concurred.
Respondent's petition for a hearing by the Supreme Court was denied October 24, 1973.
NOTES
[1]  Such a distinction was drawn in People v. Bucher (1959) 175 Cal. App.2d 343 [346 P.2d 202]. There the appellate court affirmed an order dismissing an information because of a postponement of the preliminary examination in violation of Penal Code section 861. The opinion acknowledges that if the superior court had denied the motion, there would have been no ground for a writ of prohibition or a reversal of a conviction.
