
250 Minn. 370 (1957)
84 N.W. (2d) 640
STATE EX REL. EDWARD SAVAGE
v.
DOUGLAS C. RIGG.[*]
No. 37,283.
Supreme Court of Minnesota.
August 2, 1957.
Edward Savage, pro se, for appellant.
Miles Lord, Attorney General, and Charles E. Houston, Solicitor General, for respondent.
*371 KNUTSON, JUSTICE.
This is an appeal by petitioner from an order of the District Court of Washington County denying his petition for a writ of habeas corpus. Respondent moves to dismiss the petition.
Originally, petitioner was arraigned on an information dated November 10, 1952, filed by the county attorney of Morrison County, charging him and one John Howard jointly with having committed the crime of burglary in the third degree. He appeared with his own attorney and, after objecting to the joint information, entered a plea of not guilty and demanded a separate trial. The court granted petitioner's motion for a separate trial. On November 28, 1952, the county attorney filed a new information charging petitioner individually with the crime of burglary in the third degree and stated that he filed such information because of petitioner's objection to the joint information theretofore filed. Petitioner likewise entered a plea of not guilty to this information. The case came on for trial on November 28, 1952. After several witnesses had been examined during the day, the trial was adjourned until December 1. On November 29, petitioner, with his attorney, appeared before the court and asked leave to withdraw his plea of not guilty. At the hearing, the following transpired:
"MR. GRIMES: Your Honor, at this time the defendant would like to ask leave of the Court to withdraw the plea heretofore entered in this action.
"THE COURT: Has the State any objection?
"MR. FELIX: No objection to the plea being withdrawn.
"THE COURT: The motion to withdrawn the plea of not guilty heretofore entered is granted.
"MR. GRIMES: At this time the defendant would like to enter a plea of guilty to the charge of Burglary in the Third Degree.
"THE COURT: Mr. Savage, is that your desire, to enter a plea of guilty to the Information now filed against you?
"THE DEFENDANT: Yes, Your Honor.
"THE COURT: The trial having proceeded one day, you want to withdraw your former plea and enter a plea of guilty?
"THE DEFENDANT: Yes.
*372 "THE COURT: Very well; a plea of guilty may be entered."
Thereafter, the county attorney asked leave to file an information charging petitioner with the conviction of three former felonies. Leave to file the information was granted. A transcript of the record then shows the following proceedings:
"MR. GRIMES: May I see the copy a minute?
"THE COURT: You may. Leave to file the Information is granted. You may take whatever time you want to go over it.

* * * * *
"MR. GRIMES: At this time, Your Honor, the defendant would waive the reading of the Information.
"THE COURT: You have a copy of it?
"MR. GRIMES: We were furnished with a copy.
"THE COURT: Very well. Is the defendant at this time ready to plead to the Information as to prior convictions?
"MR. GRIMES: Yes, Your Honor.
"THE COURT: And what is your plea, Mr. Savage?
"THE DEFENDANT: Guilty, Your Honor.
"THE COURT: Very well; a plea of guilty will be entered."
The court thereupon imposed an indeterminate sentence of not less than 10 nor more than 25 years' confinement in the state penitentiary at Stillwater.
After having served the maximum sentence under a conviction for burglary in the third degree without prior convictions, petitioner filed his application for a writ of habeas corpus, claiming that he was detained illegally in the state penitentiary. While the petition is far from a model, petitioner appears in his own behalf, and we have carefully examined the entire record in order to ascertain whether there is any merit to his claim. As near as we can determine, it is petitioner's contention that the sentence imposed, at least so much of it as exceeds the maximum permissible upon a conviction of burglary in the third degree without prior convictions, is void for the reason that the trial court did not inform him of his rights before accepting a plea of guilty to the information charging him with conviction of three prior felonies, as is required by M.S.A. 610.31, and that, as a result, he has been deprived *373 of his constitutional rights under Minn. Const. art. 1, §§ 6 and 7, and U.S. Const. Amends. V, VI, and XIV. Essentially, it is his claim that the sentence is contrary to due process of law.
After a hearing, the trial court denied petitioner's application for a writ of habeas corpus, and this appeal followed. The case is here de novo. We have examined the entire record, including a transcript of all proceedings had before the court prior to imposition of sentence, in order to ascertain whether the petition presents any claim which, if substantiated by evidence, would entitle petitioner to a writ of habeas corpus.
Section 610.31 reads as follows:
"If at any time before sentence, or at any time after sentence but before such sentence is fully executed, it shall appear that a person convicted of a felony, or an attempt to commit a felony, has been previously convicted of any crime so as to render him liable to increased punishment by reason thereof under any law of this state, it shall be the duty of the county attorney of the county in which such conviction was had to file an information with the court wherein the conviction was had accusing such person of such previous convictions, whereupon the court shall cause such person, whether confined in prison or otherwise, to be brought before it, either in term or in vacation, and shall inform him of the accusations contained in the information, by reading the same to him, and of his right to be tried as to the truth thereof according to law, and shall require such person to say whether he has been convicted as charged in the information or not. If he shall say that he has not been convicted as therein charged or refuses to answer, or remains silent, his plea, or the fact of his silence, shall be entered of record, and the court shall make an order directing that the truth of the accusations made in the information be submitted to a jury at the then present term of court, if in term time and a jury be in attendance, or at the next ensuing term of court when a jury shall be in attendance. If the jury shall find and determine that the accused is guilty of previous convictions as charged in the information, or if the accused acknowledges or confesses in open court, after being duly cautioned as to his rights, that he has been so convicted, the court shall sentence him to the increased punishment or penalty of imprisonment *374 to which he is liable, as provided by law, and shall vacate any previous sentence if one has theretofore been imposed; provided, that any time served under the previous sentence shall be deemed to have been served under the new sentence and shall be credited thereon." (Italics supplied.)
In State v. Zywicki, 175 Minn. 508, 510, 221 N.W. 900, 901, we said:
"* * * When the information [charging a defendant with prior convictions] is filed defendant is brought before the court and the information read to him, and he is required to say whether or not he has been convicted as charged in the information; in other words, to plead thereto. He must be informed of his right to a trial as to the truth of the charge. He is required to be cautioned as to his rights. If he denies the charge or remains silent, a jury trial must be had. The law has become a part of the laws of the state governing criminal trials and procedure. We have no difficulty in holding that the trial procedure here is the same as in trials for criminal offenses; that the defendant has the same right to a speedy trial, to time for preparation, assistance of counsel, compulsory process for witnesses, to be confronted with the witnesses against him, to require proof beyond a reasonable doubt, and to all other rights enjoyed by a defendant on trial for a criminal offense." (Italics supplied.)
In this case, petitioner was represented by competent counsel of his own choosing in all proceedings before the trial court prior to imposition of sentence. Petitioner does not now claim that he did not understand the consequences of a plea of guilty to the information charging conviction of former felonies, nor does he claim that the information was in any way erroneous.
In State ex rel. May v. Swenson, 242 Minn. 570, 574, 65 N.W. (2d) 657, 660, we said:
"Relator's claims that he did not understand the nature of his plea of guilty to second degree murder and that he did not know of his right to a jury trial are wholly unsupported. The record shows that his plea of guilty was made in open court and with advice of counsel. It is apparent that relator understood the nature of such a plea for he had previously pleaded not guilty to a first degree murder charge and *375 upon advice of counsel pleaded guilty to second degree murder. That it may have been better tactics to stand trial is not a question which can be raised in a habeas corpus proceeding."
1. Where a defendant in a criminal case who is represented by competent counsel enters a plea of guilty to a charge contained in an information filed against him, the general rule is that he waives all defenses other than that the information charges no offense.[1]
2. Having entered a plea of guilty upon advice of counsel, defendant is in the same position with respect to matters reviewable by appeal as if he had been found guilty by a jury.[2]
3. An examination of the record in this case can lead to no other conclusion than that petitioner was well and adequately represented by competent counsel throughout the proceedings prior to imposition of sentence. Not only were his rights fully protected with respect to a separate trial and with respect to filing an individual information, but the case actually did go to trial, after which defendant requested, and was granted, leave to change his plea of not guilty to guilty. In view of that conduct on his part in the trial of the main action, it cannot very well be argued that he did not understand the consequences of a plea of guilty. Under these circumstances, it must be presumed, in the absence of an affirmative showing to the contrary, that he was advised by his attorney of his rights to a jury trial of the issues presented by the information charging him with a conviction of former felonies if he desired to have such trial. His plea of guilty to the second information stands on no different ground than his plea of guilty to the information charging him with the commission of the crime of burglary in the third degree. Where a defendant appears without counsel, it is incumbent upon the court to inform him of his rights under § 610.31.[3] But, where he is adequately represented by competent *376 counsel, failure to strictly follow the statutory requirement does not vitiate a sentence imposed after a plea of guilty.
4-5. We find no denial of due process. Inasmuch as petitioner is confined under a valid sentence of commitment, he is not entitled to a discharge under a writ of habeas corpus. The claims of petitioner, even if proved, would not entitle him to a writ of habeas corpus. As to the proper function of a writ of habeas corpus, see Shaw v. Utecht, 232 Minn. 82, 43 N.W. (2d) 781, certiorari denied, 340 U.S. 855, 71 S. Ct. 73, 95 L. ed. 627; Breeding v. Utecht, 239 Minn. 137, 59 N.W. (2d) 314.
The order of the trial court is affirmed.
Affirmed.
NOTES
[*]  Certiorari denied by United States Supreme Court January 10, 1958.
[1]  22 C.J.S., Criminal Law, § 424; 14 Am. Jur., Criminal Law, § 272; Kachnic v. United States (9 Cir.) 53 F. (2d) 312, 79 A.L.R. 1366; State ex rel. Henning v. Jameson, 71 S.D. 144, 22 N.W. (2d) 731.
[2]  Spirou v. United States (2 Cir.) 24 F. (2d) 796.
[3]  As to the duty of a court to admonish a defendant of the consequences of a plea of guilty, see People v. Cooper, 366 Ill. 113, 7 N.E. (2d) 882, 110 A.L.R. 223; Annotation, 110 A.L.R. 228.
