
52 Cal.App.3d 323 (1975)
125 Cal. Rptr. 46
THE PEOPLE, Plaintiff and Respondent,
v.
RICHARD CORDELL WATERS, Defendant and Appellant.
Docket No. 2198.
Court of Appeals of California, Fifth District.
October 20, 1975.
*326 COUNSEL
Robert F. Perez for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Michael V. Franchetti and Peter J. McBrien, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
GINSBURG, J.[*]
This is an appeal from a judgment based upon appellant's pleas of guilty to an indictment charging, in count I thereof, conspiracy to sell a controlled substance in violation of Penal Code section 182, and, in count II thereof, sale of a controlled substance in violation of Health and Safety Code section 11379.
The circumstances out of which these charges arose commenced with the arrest of one Taylor as a result of a search of his residence by one Detective Matt. The search, made pursuant to permission granted by a term of probation, resulted in the finding of approximately 1,000 pills, *327 initially thought to be contraband but later determined to contain no illegal substance. After Taylor's arrest, he agreed to cooperate with the police as an informer and agent in return for monetary benefits, an agreement to shorten the terms of his probation, and, presumably, an agreement not to press charges concerning the pills then thought to be contraband. Subsequently, when it developed that the pills were not contraband, Taylor proceeded to carry out his part of the bargain anyway, and appeared before the grand jury with full knowledge of the true nature of the pills.
After his enlistment as an undercover agent, Taylor arranged to tape telephone conversations in which offers were made to sell him pills. Thereafter, he taped a telephone conversation allegedly with the appellant and one Agrillo in which they offered to sell 25,000 amphetamine pills to Taylor for the sum of $2,000. The pills were ultimately delivered by appellant and Agrillo to Taylor and Detective Matt at a prearranged place, the agreed sum of money was paid, and appellant and Agrillo were then arrested, resulting in the charges herein.
Appellant was represented at the commencement of the proceedings by Attorney Garrett. He pleaded not guilty at his arraignment, and subsequently a motion under section 1538.5 of the Penal Code for the suppression of the evidence obtained through the wiretaps was heard and denied. A Penal Code section 995 motion to set aside the indictment was also heard and denied. Appellant's attorney then filed an application for temporary stay on appeal with this court pursuant to section 1538.5 of the Penal Code. His first petition was rejected as being defective in form. A second petition filed by him on September 20, 1974, was denied as being untimely on September 23, 1974, the day that appellant's trial commenced. On that date, and before jury selection was completed, appellant moved to withdraw his plea of not guilty. Permission was granted and he entered pleas of guilty to both counts of the indictment. He specifically waived his rights in open court. The record does not reveal any reduction of either offense or other agreements made in consideration of his guilty plea; and in response to a question asked by the judge he stated that the only reason he was pleading guilty was because he was in fact guilty. The judge did continue the time for sentencing 30 days to permit appellant to appeal, and this was the only concession made to appellant on the record.
On October 23, 1974, the date set for sentencing, Robert F. Perez, appellant's counsel herein in this appeal, was substituted as counsel for *328 appellant in the place of Garrett in the court below. He immediately, prior to sentencing, moved to withdraw the plea of guilty, which motion was denied on November 8, 1974. He also made a second motion to set aside the indictment pursuant to Penal Code section 995; this motion was also denied on November 8, 1974, and the court thereupon sentenced appellant.
Appellant now appeals from the judgment after the plea of guilty on numerous grounds. A certificate of probable cause was issued by the trial court from (1) the denial of the motion to set aside the pleas of guilty, and (2) from the denial of the second motion to set aside the indictment under Penal Code section 995. In addition, appellant contends that the sentence imposed by the judgment which followed the plea constituted cruel and unusual punishment within the meaning of article I, section 6 of the California Constitution. Additional pertinent facts will be related in connection with our discussion of these contentions.

I. Denial of the Motion to Withdraw Appellant's Plea of Guilty.

In considering the propriety of the denial of the motion to withdraw appellant's guilty plea, we preliminarily observe that a plea of guilty may be withdrawn at any time before judgment for good cause shown under the provisions of Penal Code section 1018.[1] (1) The granting or denial of an application to withdraw a guilty plea is within the discretion of the trial court after a consideration of all the factors necessary to bring about a just result; and the decision of the trial judge will not be disturbed on appeal unless an abuse thereof is clearly demonstrated. (People v. Superior Court (Giron) (1974) 11 Cal.3d 793, 798 [114 Cal. Rptr. 596, 523 P.2d 636]; In re Brown (1973) 9 Cal.3d 679, 685 [108 Cal. Rptr. 801, 511 P.2d 1153].) (2) While the section is to be liberally construed and a plea of guilty may be withdrawn for mistake, ignorance, or inadvertence or any other factor overreaching defendant's free and clear judgment, the facts of such grounds must be established by clear and convincing evidence. (People v. Cruz (1974) 12 Cal.3d 562, 566 [116 Cal. Rptr. 242, 526 P.2d 250]; see also People v. Dena (1972) 25 Cal. App.3d 1001, 1008 [102 Cal. Rptr. 357].)
*329 We now examine the various grounds which appellant contends show an abuse of discretion by the trial court in denying his application for leave to withdraw his guilty plea.
(1) (3) Appellant contends that he did not understand the distinction between a general or unrestricted right to appeal and the right which would be limited by a certificate of probable cause; that at the time of entering his plea he thought that all matters theretofore raised on his behalf, including those raised in a motion under Penal Code section 995, would be preserved on appeal, and but for this belief he would not have pleaded guilty. This contention, and a concomitant contention that his mistaken belief was caused by a misrepresentation made by his then attorney, was the subject of considerable evidence adduced at the hearing on the motion to withdraw before the trial court. Although the evidence is unclear, there is testimony by appellant's attorney, Garrett, supportive of the conclusion that appellant, at the time of entering his guilty plea, was concerned only with the matters connected with his Penal Code section 1538.5 motion, a writ of prohibition or mandate having just been denied by this court; and that he was properly advised that these matters would be preserved for further appellate review under Penal Code section 1538.5, subdivision (m).
It is also undisputed that no conditions were made or attached to his guilty plea insofar as the trial court was informed;[2] before the trial judge accepted appellant's guilty plea appellant affirmatively stated that no promises had been made to him. The case is thereby distinguished from People v. Brown (1971) 18 Cal. App.3d 1052 [96 Cal. Rptr. 476], wherein the defendant entered into a plea bargain based upon being granted appeal rights. Here there was no bargain; the appellant simply elected to enter his plea and pursue the appellate remedies provided by Penal *330 Code section 1538.5, subdivision (m).[3] There is, in short, substantial although conflicting evidence to sustain the finding of the trial court that appellant did not enter his plea of guilty as a result of either misrepresentation of his appeal rights by his attorney or a misunderstanding of them.
(2) (4a) Appellant also contends he was denied the effective assistance of counsel, and that his plea should therefore be set aside. He bases this contention on two alleged instances of inadequate representation:
(a) Attorney Garrett admittedly did not consider as a defense what appellant now claims were defects in the chain of possession of the narcotics in question. But an examination of the grand jury transcript reveals adequate identification and chain of possession testimony; appellant has not demonstrated that he did in fact have a meritorious defense in this regard. Inadequacy of counsel is not established by counsel's failure to raise a defense which has no substantive merit.
(b) Attorney Garrett did not raise the issue of lack of consent by Taylor to the recording of the taped conversation. But no question of consent is shown by an examination of the record, and no facts showing that this was a meritorious defense were brought to the attention of the trial court on the motion to withdraw appellant's guilty plea.
(5) Where trial counsel fails to make careful inquiries and investigations which result in the withdrawal of a crucial defense from the case, the defendant is deprived of the assistance of counsel. (People v. Stephenson (1974) 10 Cal.3d 652, 661 [111 Cal. Rptr. 556, 517 P.2d 820].) The defendant bears the burden of establishing counsel's ineffectiveness, and the proof must be a demonstrable reality and not a speculative matter; the record must establish that counsel was ignorant of the facts or the law and that such ignorance resulted in the withdrawal of a crucial defense. (People v. Jenkins (1975) 13 Cal.3d 749, 753 [119 Cal. Rptr. 705, 532 P.2d 857].)
*331 (4b) Here appellant failed in his burden of proving ineffectiveness; there was no ignorance of the law or facts shown, and no failure to recognize a defense that was crucial or even meritorious.
Applicable to this case are the words of the Supreme Court in Giron, supra, 11 Cal.3d at page 798: "The situation in the instant case is one in which the [trial] court was properly vested with discretion to grant or to deny the motion after considering all factors necessary to bring about a just result. We would not necessarily conclude that a court abused its discretion if it either granted or denied [this] motion ...; the test of abuse in such circumstances is whether after consideration of all relevant factors there was good cause shown for granting the motion and whether justice would be promoted thereby." The phrase "good cause" has been said to codify the rule that leave to withdraw a plea with its resulting inconvenience and expense should not be lightly granted. (Witkin, Cal. Criminal Procedure (1963) Proceedings Before Trial, § 260, p. 239.) It can also be said that the words "whether justice would be promoted thereby" require a consideration of the rights of the respondent, The People of the State of California, as well as those of the appellant. The rights of respondent surely include the right not to have a guilty plea set aside or withdrawn without good cause, thereby resulting in a needless expenditure of time and money in the trial of the case.
Considering all factors, we find no clear and convincing evidence that appellant's plea of guilty was not the result of his free and clear judgment. No abuse of discretion being found, the order denying the motion to vacate the plea will not be disturbed.

II. Refusal of the Trial Court to Set Aside the Indictment.

(6) After appellant had entered his plea of guilty, but before judgment was pronounced, his substituted counsel made a second motion to set aside the indictment. The trial court refused to entertain the motion on the grounds that it was not timely filed. Appellant charges error, contending the trial court could still hear the motion "prior to trial" under the provisions of Penal Code section 997.[4]
The purpose of Penal Code section 997 is to prevent unnecessary trials. (People v. Sigal (1967) 249 Cal. App.2d 299, 305 [57 Cal. Rptr. 541].) Prior *332 to 1968, it required the 995 motion to be made before plea. In 1968 it was amended to its present form to provide the motion may be heard "prior to trial," whether or not a plea has been entered. Appellant contends that since there has been no trial, another motion may be made.
Obviously, the intent of the Legislature in amending the section was to extend the time until trial where a plea of not guilty had been entered. Where a plea of guilty is entered, such a plea eliminates the trial and must necessarily terminate the right to contend that the indictment or information was based upon insufficient evidence. To construe the amendment otherwise would be to extend the time to make such a motion indefinitely even up to and after taking an appeal; and it is apparent from this section, and from section 996 of the Penal Code[5] that the Legislature intended a definite termination period on the right to raise such issues.
Furthermore, a plea of guilty constitutes an admission of each element of the offense. (People v. Stanworth (1974) 11 Cal.3d 588, 605 [114 Cal. Rptr. 250, 522 P.2d 1058].) It follows that a guilty plea must logically be construed as an admission of the existence of probable cause. We therefore hold that the entry of the guilty plea constituted a bar to the making of a Penal Code section 995 motion thereafter.

III. Was the Punishment Imposed Cruel and Unusual and in Violation of Article I, Section 6 of the California Constitution?

(7) Appellant next contends that the punishment imposed for a violation of Health and Safety Code section 11379 is a cruel and unusual punishment. He bases this contention on article I, section 6 of the California Constitution which provides, in part: "Excessive bail shall not be required, nor excessive fines imposed; nor shall cruel or unusual punishments be inflicted."
(1) He first argues that the sentence of five years to life is cruel and unusual punishment. The recent case of People v. Wingo (1975) 14 Cal.3d 169 [121 Cal. Rptr. 97, 534 P.2d 1001] involved substantially the same contention of unconstitutionality with regard to a conviction of violation of Penal Code section 245, subdivision (a) (assault). The court held that by reason of the possible variance in the length of the term, and in further view of the wide range of circumstances which could be *333 attendant upon a violation of section 245, subdivision (a), a determination as to whether the sentence was cruel and unusual could necessarily not be made until such time as the Adult Authority had fixed the length of the term.
We hold that the same considerations apply in the case of the violation of Health and Safety Code section 11379. The nature of the offense, and the circumstances surrounding it, can show substantial and important variations; the act involved may vary from simply giving away one pill to commercially selling thousands of amphetamine pills for profit, as was here charged. Obviously, as in Wingo, whether the punishment fits the crime cannot be ascertained until after the punishment has been determined; habeas corpus will then be appellant's available remedy.
(2) (8) Appellant also claims that the minimum of three years before eligibility for parole, as fixed in Health and Safety Code section 11379, constitutes cruel and unusual punishment.
In People v. Serna (1975) 44 Cal. App.3d 717 [118 Cal. Rptr. 904], involving a conviction for the sale of heroin (violation of Health & Saf. Code, § 11352), the court held that a three-year minimum term for that offense was not unconstitutional as constituting cruel and unusual punishment. We fail to see any substantial difference in the comparative gravity of the offense there and the offense here. Another consideration is the fact that the maximum for the offense proscribed by section 11379 of the Health and Safety Code is life imprisonment. In the light of all of the foregoing considerations, the three-year minimum term would appear not to be a cruel and unusual punishment. In order to sustain his contention to the contrary, appellant is required to show that the punishment provisions are so disproportionate to the crime "... that it shocks the conscience and offends fundamental notions of human dignity." (In re Lynch (1972) 8 Cal.3d 410, 424 [105 Cal. Rptr. 217, 503 P.2d 921].) Appellant has failed to so demonstrate.
The judgment is affirmed.
Brown (G.A.), P.J., and Thompson, J.,[*] concurred.
Appellant's petition for a hearing by the Supreme Court was denied December 30, 1975.
NOTES
[*]   Assigned by the Chairman of the Judicial Council.
[1]  Penal Code section 1018 provides in pertinent part: "... On application of the defendant at any time before judgment the court may, and in case of a defendant who appeared without counsel at the time of the plea the court must, for a good cause shown, permit the plea of guilty to be withdrawn and a plea of not guilty substituted.... This section shall be liberally construed to effect these objects and to promote justice."
[2]  The only mention of record of appellant's appeal rights at the time he changed his plea was as follows:

"THE COURT: In accordance with the laws of the State of California relating to criminal cases, this case will be referred to the Probation Office for its investigation and report back to this Court. Now let me stop right there.
"Mr. Garrett, you explain to me you'd like to have this time of sentencing put over for 30 days.
"MR. GARRETT: Yes.
"THE COURT: So you can make certain motions in the Appellate Court and I am willing to do this, however, Mr. Waters, unless you waive time for pronouncement of judgment and sentence I must do this not later than 21 days from today.
"THE DEFENDANT: I will waive time."
[3]  Penal Code section 1538.5, subdivision (m), provides in part as follows: "... A defendant may seek further review of the validity of a search or seizure on appeal from a conviction in a criminal case notwithstanding the fact that such judgment of conviction is predicated upon a plea of guilty. Such review on appeal may be obtained by the defendant providing that at some stage of the proceedings prior to conviction he has moved for the return of property or the suppression of the evidence."

We note that a petition for a writ under Penal Code section 1538.5, subdivision (m), was in fact filed with the Supreme Court, and was later denied.
[4]  Penal Code section 997 provides, in part, as follows: "The court may entertain such motion [under Pen. Code, § 995] prior to trial whether or not a plea has been entered and such plea need not be set aside in order to consider the motion."
[5]  Section 996 provides: "If the motion to set aside the indictment or information is not made, the defendant is precluded from afterwards taking the objections mentioned in Section 995."
[*]   Retired judge of the superior court sitting under assignment by the Chairman of the Judicial Council.
