
42 Cal.App.3d 960 (1974)
117 Cal. Rptr. 295
THE PEOPLE, Plaintiff and Respondent,
v.
JOHN HENRY CASTRO, Defendant and Appellant.
Docket No. 6667.
Court of Appeals of California, Fourth District, Division One.
November 6, 1974.
*962 COUNSEL
Paul Bell, under appointment by the Court of Appeal, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Daniel J. Kremer, Assistant Attorney General, Harley D. Mayfield and Karl J. Phaler, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
AULT, J.
On the basis of evidence seized in their residence during a search pursuant to a warrant, appellant John Henry Castro and his wife Gloria were charged by indictment with one count of possessing controlled substances for sale (Health & Saf. Code, § 11351), four counts of receiving stolen property (Pen. Code, § 496, subd. 1), one count of possessing narcotic paraphernalia (Health & Saf. Code, § 11364), one count of possessing marijuana (Health & Saf. Code, § 11357), and eight counts of possessing property from which the serial numbers had been removed (Pen. Code, § 537e, a misdemeanor). Later by supplemental indictment it was alleged Castro had suffered four prior felony convictions (two convictions of Pen. Code, § 459; Veh. Code, § 506 and Pen. Code, § 288a). The court denied pretrial motions under Penal Code sections 995, 1531 and 1538.5 and, after an in camera hearing, also motions to disclose the identity of the informant.
One month later, pursuant to a plea bargain, Castro pleaded guilty to possessing heroin (Health & Saf. Code, § 11351) and receiving stolen property (Pen. Code, § 496, subd. 1). The court dismissed the remaining *963 13 counts and struck the allegations concerning his prior convictions in the furtherance of justice. Sentenced to serve concurrent terms in state prison, Castro appeals from the judgment, seeking review of the denial of his motions to disclose the informant and to suppress evidence (Pen. Code, § 1538.5). A certificate of probable cause has been filed pursuant to Penal Code section 1237.5.[1]

DISCUSSION
(1a) An order denying a motion to disclose the identity of an informant is not subject to review on appeal after the defendant has entered a plea of guilty (People v. Archuleta, 16 Cal. App.3d 295, 299 [93 Cal. Rptr. 881]). This is so because the purpose of the motion relates solely to the defendant's guilt or innocence, an issue which is removed by the guilty plea. (2) A judgment entered upon a plea of guilty is not appealable on the merits, and irregularities not going to jurisdiction or to the legality of the proceedings will not be reviewed (People v. Laudermilk, 67 Cal.2d 272, 281-282 [61 Cal. Rptr. 644, 431 P.2d 228]).
It is apparent, both from the context of defendant's motion and the questions he submitted to be propounded to the informant in the in camera hearing (Evid. Code, § 1042, subd. (d)), that defendant sought disclosure of the informant in the hope of showing a third person had dominion and control over the contraband he was charged with possessing. (3) Indeed, disclosure could only have been ordered on a showing the informant would be a material witness on the issue of guilt (People v. Garcia, 67 Cal.2d 830, 839 [64 Cal. Rptr. 110, 434 P.2d 366]). Defendant eliminated that issue when he pleaded guilty to possessing stolen property and possessing heroin for sale, testifying in the process that he received a bicycle, knowing it was stolen, and possessed three ounces of heroin for sale which he hid in his backyard. Defendant cannot admit he possessed the contraband by pleading guilty and then question the judgment on the ground some witness he was not permitted to discover might possibly have testified otherwise. (See People v. Brown, 18 Cal. App.3d 1052, 1055 [96 Cal. Rptr. 476].) The two positions are inconsistent.
Defendant seeks to avoid application of the general rule barring appellate review of the issue after a guilty plea by claiming the right to appeal from *964 the order denying disclosure was a part of his plea bargain and thus preserved. (1b) While a plea bargain has been permitted to accomplish that result where the pretrial ruling specifically reserved for appeal was collateral to and not inconsistent with the guilty plea (see People v. Glover, 40 Cal. App.3d 1006, 1010-1011 [115 Cal. Rptr. 714], where appellate review of the denial of the motion to dismiss for lack of a speedy trial was permitted), it has not been permitted to do so where, as here, the result would be wholly illogical and totally inconsistent (see People v. Brown, supra, 18 Cal. App.3d 1052, 1054-1055). In any event, the record does not support defendant's contention the issue was preserved for appeal as a part of a plea bargain.
Before appearing in court to change his plea, defendant, his counsel and the prosecutor, negotiated a plea bargain and all three eventually signed a written change of plea form. Added to the form in handwriting were the words: "Defendant reserves the right to appeal the court's denial of any pretrial motion." At the insistence of the prosecutor, these words were blocked out of the form and initialed by the defendant before the document was filed with the court. We set out in Appendix "A" the full transcript of the proceedings relating to this aspect of the plea bargain.
It is apparent from the record that no agreement had been reached when the parties initially appeared. The prosecutor insisted the defendant waive his right to appeal from the denial of his motion to suppress evidence (Pen. Code, § 1538.5, subd. (m)). The defendant opposed this, and his attorney was fearful he would waive the statutory right to appeal from the denial of the motion to suppress unless the record reflected he specifically reserved it. When the trial judge discovered this impasse, he properly refused to proceed with the change in plea and suggested the parties talk further to see if they could reach an agreement. When they returned to court, defendant's attorney announced the agreement, stating: "We've discussed the matter that was presented by the Court, and would state at this time that we would not waive our right to appeal for the record. The District Attorney is satisfied with that." This statement cannot be interpreted as enlarging defendant's right to appeal or be expanded into an agreement that he reserved the right to raise issues which are not reviewable on appeal. Such an understanding was not expressed by defendant or his attorney, accepted by the prosecutor, or approved by the court.
Defendant's position is not strengthened by the fact he obtained a certificate of probable cause under Penal Code section 1237.5 based upon a declaration, stating: "Reasonable constitutional or jurisdictional grounds exist for an appeal in this matter to wit; denial of the informant's identity, denied my right to cross-examine and confront a material witness on the issue of my innocence and I was, therefore, unable to receive a fair trial. *965 It was partially on this basis that my plea of guilty was entered." The certificate was obtained almost two months after defendant changed his plea. The declaration was presented to, and the certificate was signed by, the judge who had heard the motion to disclose the identity of the informant and not by the judge who had taken the change of plea. (4) The terms of a plea bargain must be gathered from what was said and done at the time the bargain was made, and not by a declaration filed by the defendant two months later. (5) The certificate is a procedural requirement to perfect an appeal from a judgment based upon a plea of guilty; it does not provide grounds for an appeal or determine the issues which are reviewable. (See People v. Ribero, 4 Cal.3d 55, 63 [92 Cal. Rptr. 692, 480 P.2d 308].)
(1c) For the reasons stated above, we hold denial of the motion to disclose the identity of the informant is not reviewable on an appeal from a judgment based upon the defendant's plea of guilty. We also hold the right to such a review was not a part of the plea bargain in this case and that defendant, unlike the defendant in People v. Brown, supra, 18 Cal. App.3d 1052, is not entitled to a remand with instructions to permit him to withdraw his plea of guilty.
Penal Code section 1538.5, subdivision (m), states a defendant may seek review of a denial of his motion to suppress evidence "notwithstanding the fact that such judgment of conviction is predicated upon a plea of guilty."
(6a) Defendant contends his motion under Penal Code section 1538.5 should have been granted because the affidavit supporting the search warrant did not furnish probable cause to search. He relies upon Stoehr v. Superior Court, 34 Cal. App.3d 197 [109 Cal. Rptr. 756].
In his affidavit dated June 7, 1973, Officer Jaffe stated he had reasonable cause to believe a specified two-story one-family dwelling, together with its yards and garages, and also five described automobiles at that location contained the following personal property: specified stolen property, including a color TV, a tape deck, guns and one "Petri" 35mm single lens reflex camera with an 80-200mm zoom lens mounted on a homemade rifle stock; narcotics including heroin; and paraphernalia for packaging and use of heroin. Jaffe related his experience in burglary and narcotics investigation and his experience with a confidential informant found by him to be reliable. The critical part of the affidavit states: "Said informant told me the following regarding said premises: That on at least one occasion within the past eight days, said informant was at said premises; and on each such occasion, said informant observed one `Petri' 35mm single lens reflex camera with a telephoto lens, mounted on a rifle stock, located in the downstairs *966 portion of said premises; and also observed a large quantity of brown powder in bulk form in a rubber condom in a bedroom at said premises. Said informant also told me that within the past ten days said informant observed colored balloons containing a brown powder within the above-mentioned lime green Volkswagen, white Volkswagen and black Corvair; and said informant told me that the resident of said premises `stashes' heroin in the cars on the premises. Said informant told me that all of the brown powder said informant observed in bulk form and in the rubber balloons in the last ten days was heroin."
The affidavit found defective in Stoehr, supra, stated merely that the informant reported seeing "heroin in the residence." By contrast the affidavit here gives the informant's detailed description of the stolen camera and his rough description of the heroin's quantity and packaging as well as the location of the contraband within the house. (7) The weight to be given allegations in the affidavit is to be determined by the trier of fact. (Skelton v. Superior Court, 1 Cal.3d 144, 150 [81 Cal. Rptr. 613, 460 P.2d 485].) (6b) The affidavit is not insufficient as a matter of law, and the trial court's ruling on the motion to suppress must be upheld.
The judgment is affirmed.
Brown (Gerald), P.J., and Whelan, J., concurred.
A petition for a rehearing was denied November 18, 1974, and appellant's petition for a hearing by the Supreme Court was denied January 8, 1975.


*967 APPENDIX "A"
The transcript reads as follows: "Mr.... (defense counsel): Your Honor, on behalf of Mr. Castro, I'd like to reserve the right to reserve any decisions on pretrial motions. Also, there's been some confusion on recent dates. I'd like to, for the record, preserve the right  although I think it's statutorily given us 
"THE COURT: Is that understood between all parties?
"Mr.... (prosecutor): No, your Honor. I'd rather we agreed not to appeal it on a 1538. In fact, he had that in the plea bargain agreement and I had him strike it.
"Mr.... (defense counsel): I'd like to state for the record that I'd like to reserve that right. At this point it's unclear what that means, but I'd like to stay on the record.
"THE COURT: Well, if you are at odds on that score, maybe you had better talk about it some more.
"Mr.... (defense counsel): Well, I don't know whether that would be a part of the actual plea between the District Attorney and I, and I would note that he does object to it, but there is a question in my mind under the Escobar decision whether or not he could do that. So I'd like to just state for the record that we do, we reserve that right, because I think under the statute and the 1538.5 we have the right. But, as I said, some recent cases shed some doubt on that.
"THE COURT: Apparently you talked about it, because it is stricken from the form.
"Mr.... (defense counsel): That's correct, your Honor.
"THE COURT: It might well be the subject of bargaining in connection with the plea bargain; that is, the right to appeal. Perhaps you had better talk about it before  and then perhaps I had better set aside my order relative to the plea until you have resolved that issue.
"Mr.... (defense counsel): (Nodding.)
"THE COURT: All right. The order that I made accepting the pleas will be set aside, and we'll put this at the  call this matter again in a few minutes.
"Mr.... (defense counsel): All right. Thank you, your Honor.
".... .... .... .... ....
"THE BAILIFF: Your Honor, number 8 is ready again.
"THE COURT: All right. People versus Henry John Castro [sic] and Gloria Cecelia Castro.
"Mr.... (Defense counsel): Yes, your Honor. We've discussed the matter that was presented by the Court, and would state at this time that we would not waive our right to appeal for the record. The District Attorney is satisfied with that.
"THE COURT: All right. The record may so indicate."
NOTES
[1]  Penal Code section 1237.5 reads: "No appeal shall be taken by defendant from a judgment of conviction upon a plea of guilty or nolo contendere, except where: (a) The defendant has filed with the trial court a written statement, executed under oath or penalty of perjury showing reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings; and (b) The trial court has executed and filed a certificate of probable cause for such appeal with the county clerk."
