
140 Cal.App.2d 97 (1956)
THE PEOPLE, Respondent,
v.
LEE SPENCER, Appellant.
Crim. No. 3150. 
California Court of Appeals. First Dist., Div. Two.  
Mar. 21, 1956.
 Kretzmer & Landisman and Joseph Landisman for Appellant.
 Edmund G. Brown, Attorney General, Clarence A. Linn, Assistant Attorney General, John S. McInerny, Deputy Attorney General, J. Frank Coakley, District Attorney (Alameda) and Dale I. Stoops, Deputy District Attorney, for Respondent.
 DOOLING, J.
 Appellant was charged in an information containing two counts with possession and sale of heroin. The jury found appellant not guilty on the possession count and guilty on the count charging a sale. This appeal is from the judgment of conviction of sale.
 The evidence is in sharp conflict. On October 1, 1954, around midnight Officer Hilliard observed appellant and one Jewell Chambers in appellant's automobile. These two got out of appellant's automobile and went to another parked car in which Lloyd Broadnax and Katherine Jones were seated in the front seat. Jewell Chambers got into the rear seat and appellant stood by the driver's side of the automobile talking to the occupants. They were all eating some baked spareribs which Broadnax had in his automobile. Officer Hilliard approached and seized appellant. The two women fled and were not apprehended until some time later. *99
 A search of appellant's person disclosed no narcotics but inside the front door against which appellant had been leaning a crumpled, damp Chesterfield cigarette package was found containing a quantity of heroin.
 Appellant, Broadnax and the two women were jointly charged with possession of heroin and appellant was further charged with a sale of heroin. At the preliminary hearing the committing magistrate dismissed the charge against Broadnax and the two women on the motion of the district attorney on the stated ground that the dismissal was for the purpose of permitting them to be witnesses for the People. The three then testified for the People and appellant was held to answer.
 At the trial Jewell Chambers was not called as a witness because she could not be located and the trial judge refused to allow her testimony at the preliminary hearing to be read on the ground that the district attorney had not shown due diligence in attempting to find her. Katherine Jones, an admitted narcotics user, testified that on the evening of his arrest appellant had sold her some heroin which he handed to her while he was standing by Broadnax' automobile. She testified that before her arrest she had used this heroin. Broadnax testified that while he was standing by the automobile appellant had leaned across him and handed something to Katherine Jones. Appellant denied selling or delivering any heroin to Katherine Jones.
 [1] Appellant's claim that the verdicts are inconsistent is untenable. The charge of possession related to the heroin in the cigarette package found in the automobile and the charge of sale related to a different quantity of heroin, that which Katherine Jones testified that appellant had sold and delivered to her.
 [2] At least two other assignments of error, however, are substantial and under the circumstances of this case the errors were prejudicial. The jury found appellant not guilty of the charge of possession of the heroin found in the cigarette package, as to which the evidence was wholly circumstantial. They found him guilty of the charge of sale as to which the only direct evidence came from Katharine Jones, who was corroborated by Broadnax to the extent that he testified that he saw appellant hand Miss Jones something (which he did not further identify). Appellant's attorney argued to the jury that these two witnesses were testifying under the possible *100 duress of themselves being prosecuted for the same offense. The court instructed the jury:
 "When two or more persons are included in the same charge, the Court may at any time before the defendants have gone into their defense, on the application of the District Attorney, direct any defendant to be discharged so that he may be a witness for the People."
 "The order mentioned in the Penal Code section quoted above is an acquittal for the defendants discharged and is a bar to another prosecution for the same offense."
 [3] The section referred to is Penal Code, section 1099, which reads:
 "When two or more defendants are included in the same accusatory pleading, the court may, at any time before the defendants have gone into their defense, on the application of the prosecuting attorney, direct any defendant to be discharged, that he may be a witness for the people."
 Section 1101 Penal Code provides that this order "is an acquittal of the defendant discharged, and is a bar to another prosecution for the same offense."
 These sections are found in chapter II, part II, title VII of the Penal Code which is headed "The Trial" and title VII of which this chapter is a part is headed "Proceedings After the Commencement of the Trial and Before Judgment." The proceedings before a committing magistrate are in chapter VII, part II, title III Penal Code and are headed: "Examination of the Case, and Discharge of the Defendant, or Holding Him to Answer." From an examination of the code itself it seems perfectly clear that section 1099 has no reference to a preliminary hearing before a magistrate and gives no power to a magistrate holding a preliminary hearing to discharge a defendant so as to give his order of discharge the effect provided in section 1101 of an acquittal and bar to further prosecution for the same offense. In felony cases that power is limited to the court before which the defendant is brought for trial after an information or indictment has been returned.
 There is little authority on the subject but such as there is is consistent with this conclusion. The leading case is People v. Indian Peter, 48 Cal. 250. At the preliminary hearing in that case the defendant had been informed by the committing magistrate "that if he would become a witness for the people against two persons charged with the same offense ... the defendant would thereby be acquitted of *101 any crime therein" and the district attorney with knowledge of this fact used him as a witness. The defendant was afterwards tried and convicted for the same offense and urged the proceedings before the committing magistrate as a bar. The court pointed out that the proceeding is regulated by statute (citing Pen. Code,  1099 and 1101) and concluded (p. 253): "The statute having thus designated the cases in which, and the proceedings by which, an indictment may be dismissed and a discharge awarded the accused without actual trial, must be taken to exclude all other cases, or cases not provided for by its terms." This case was decided in 1874 and in all the subsequent amendments to the Penal Code including the extensive amendments in 1951 (Stats. 1951, p. 3829) section 1099 has continuously remained in the chapter dealing with trials. Prior to 1951 section 1099 read: "When two or more persons are included in the same charge, the court may, at any time before the defendants have gone into their defense, on the application of the district attorney, direct any defendant to be discharged, that he may be a witness for the people."
 The 1951 amendment, in accordance with a general, overall substitution of terms which covered many sections of the Penal Code, in section 1099 substituted the words "accusatory pleading" for the word "charge," and the words "prosecuting attorney" for the words "district attorney." However the Legislature left the amended section in the same chapter dealing with the subject of "The Trial" and gave no indication that they intended to enlarge its scope to cover the action of magistrates at preliminary hearings. It is true that in Bates v. Superior Court, 107 Cal.App.2d 656 at page 658 [237 P.2d 544] the court said: "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 an open question. (People v. Indian Peter, 48 Cal. 250 ... see amendment 1951 to section 1099 Penal Code.)" If there is any suggestion in this language that the court in that case believed that the 1951 amendment to section 1099 gave the power to a committing magistrate to discharge a defendant under that section it is purely dictum. The court's actual holding was limited to the decision that having discharged the defendant the committing magistrate thereby lost "jurisdiction to further act" in that particular proceeding.
 The court in that case did not consider the position of section *102 1099 in the chapter dealing exclusively with "The Trial," a factor which we consider decisive of its meaning and scope. Nor did it consider the further implication of such a construction in view of section 1100, which provides: "When two or more defendants are included in the same accusatory pleading, and the court is of opinion that in regard to a particular defendant there is not sufficient evidence to put him to his defense, it must order him to be discharged before the evidence is closed, that he may be a witness for his codefendant."
 If section 1099 gives the power of discharge to a committing magistrate section 1100 gives a like power. This would mean that even over objection of the district attorney the committing magistrate could discharge any defendant at a preliminary hearing when two or more defendants were jointly charged and such discharge under section 1101 would operate as an acquittal. It would take strong reasons, which do not here exist, to impute to the Legislature the intention to give such a drastic power to a committing magistrate. We are satisfied that neither section 1099 nor section 1100 applies to a preliminary hearing before a magistrate.
 [4] Appellant also assigns as prejudicial error the conduct of the prosecuting attorney and the court as shown by the record in the following portions of the transcript:
 "Q. (by the prosecuting attorney, cross-examining the defendant): Is it not true that on or about the 4th day of May, 1951 you pleaded guilty to a violation of Section 11500 of the Health and Safety Code ..."
 "Mr. Mintz: Just a moment, just a moment, if the Court please, the Section 11500 is a misdemeanor and I charge Mr. Stoops with asking this question deliberately for the purpose of inflaming the jury ... it is an improper question. I am going to ask the Court to admonish the jury to disregard it. * * *"
 "Mr. Stoops: In fairness to all, your Honor, the sentence in the case was one year in the County Jail."
 "The Court: Then it is a misdemeanor ... The objection is sustained and the jury is instructed and directed to disregard the asking of the question."
 Thereupon outside the presence of the jury defense counsel made a motion for mistrial on the ground that "the prosecution has indicated to the jury a previous conviction of a *103 narcotics offense which was not a felony." This motion was denied.
 Immediately thereafter the court made the following statement to the jury:
 "... (L)adies and gentlemen of the jury, after considering the last few questions and answers with reference to a misdemeanor, alleged to have been committed in May, 1951, that testimony is not admitted for the purpose of impeachment as is the testimony with respect to another conviction of a felony, but this having been a misdemeanor, it is not admissible as impeachment of the witness. However, it is, in my opinion, admissible for the purpose of establishing, tending to establish I should say one of the elements of the offense ... namely knowledge of the nature of the drug alleged to have been possessed by the defendant."
 In the instructions to the jury on submission of the case the court again advised the jury:
 "Evidence of previous conviction of a misdemeanor violation of the State Narcotic Act was admitted solely for whatever bearing it may have on the question of whether or not the defendant knew that the substance he is alleged to have possessed in the second count of the information, was a narcotic as I have before instructed you, and not for the purpose of impeachment, and must not be considered by you for the purpose of impeachment."
 It will be observed that after first sustaining the objection to the question which was for that reason never answered by the witness, the court thereafter twice mistakenly assumed in instructions to the jury that the question had in fact been answered and answered affirmatively. The serious question, however, is whether by these repeated comments the trial court so emphasized the fact of a previous narcotics conviction that the jury may have been unduly impressed by that factor in what was admittedly a close case depending almost wholly on the testimony of Katherine Jones as weighed against the testimony of the defendant, in spite of the fact that the court instructed them of the limited purpose for which they might consider this testimony.
 Knowledge of the narcotic character of the substance is an essential element of the violation of the narcotics code. (People v. Winston, 46 Cal.2d 151 [293 P.2d 40].) However a reading of this transcript satisfies us that the defendant in this case was not advancing the defense that he *104 was not acquainted with the narcotic drug heroin. Immediately before the question about defendant's conviction of violating section 11500 Health and Safety Code the following questions were asked of the defendant to which he gave the following answers:
 "Q. Do you know what the expression 'paper of heroin' is? * * *"
 "A. Sure, I do."
 "Q. Now I will show you People's Exhibit 2 in Evidence. What is that? A. That is a bindle of heroin."
 It may be conceded that if appellant's knowledge of the narcotic heroin had been a real issue in the case evidence of his prior conviction of possession of heroin, although not admissible generally, would be admissible for the limited purpose of proving such knowledge, under the instructions given to the jury that it was to be considered by the jury for that limited purpose only. [5] The rule is that evidence generally inadmissible is admissible to prove a particular fact, when that fact is an issue in the case, and the risk of its misuse by the jury is then to be controlled by an instruction to the jury limiting its use to the particular issue. The courts have held that the risk of its misuse by the jury in such a case is overbalanced by its value as evidence on the particular issue, and the party against whom it is introduced is then sufficiently protected by the court's instruction to the jury that they may only consider it in resolving the particular issue. We said on this question in People v. Malicoat, 89 Cal.App.2d 742, 745-746 [201 P.2d 850]:
 "Where evidence is properly admissible for a limited purpose only the courts recognize the danger that it may be improperly considered by the jury for other purposes (Adkins v. Brett, 184 Cal. 252, 256- 259 [193 P. 251]) but that is a risk which must ordinarily be taken if the evidence is admissible for some purpose, and a cautionary instruction limiting its use to the proper purpose is all the protection that the party can be given under the circumstances. For this reason it is generally held that there is no prejudice from the admission of such evidence where the jury is properly instructed as to its limited purpose (10 Cal.Jur.  105, p. 815.) But where the evidence is not admissible for any purpose the reason for the rule ceases. There is no justification for the risk of its misuse by the jury and if the fact of its misuse seems at all probable the court should not hesitate to find prejudice in the error." *105
 The rule is one of necessity and the risk of misuse should not be incurred if the evidence is not directed to a disputed issue in the case. Here the record was clear, before the question of appellant's prior conviction of the misdemeanor conviction of possession of heroin was first asked by the prosecutor, from appellant's own testimony above quoted that appellant knew what heroin was. His defense, already developed was not that he did not know what heroin was but that he was not guilty of the possession and sale of the particular heroin as charged in the information. Since it was already clear that knowledge of the narcotic character of heroin was not in issue there was no reason, and no justification, for the admission of this evidence with the attendant danger of its misuse by the jury despite the cautionary instruction of the court.
 The conviction depended basically on weighing the evidence of the witness Jones against the evidence of the appellant. The fact that the jury refused to convict the appellant of possession of the narcotic found in the car further emphasizes the closeness of the case in the eyes of the jury. We are satisfied that in such a close case the errors discussed may well have swung the balance and that these errors were in fact prejudicial.
 Judgment reversed for a new trial.
 Nourse, P. J., and Kaufman, J., concurred.
