The charge against Brandenburg of operating a motor vehicle while under the influence of alcohol was properly before the Hamilton County Municipal Court. In relation to that charge, the defendant may pleiad no contest with consent of the court. Crim. E. 11(A). In'that event,'Crim. E. 11(B)(2)' provides as follows:
“The plea' of no contest is not an admission of de*382fendant’s guilt, but is an admission of the truth of the facts alleged in the indictment, information, or complaint and such plea or admission shall not be used against the defendant in any subsequent civil or criminal proceeding.”
Both parties agree that the trial court has the power to consider whether the facts alleged in the complaint, which are admitted by the plea of no contest, constitute the basis for a finding of guilty or not guilty. In the event of a finding of not guilty as to the principal charge, the court may find defendant guilty of a lesser-included offense.
If the court, in so exercising its power, erred to the prejudice of defendant, the defendant’s remedy is to appeal to the Court of Appeals. The state, however, has no right to appeal a judgment in a criminal case, no matter how erroneous, except where the judgment of such court decides “ ‘a motion to quash, a plea in abatement, a demurrer, or a motion in arrest of judgment,’ or the equivalent thereof.” Euclid v. Heaton (1968), 15 Ohio St. 2d 65.
Appellees argue that the trial court’s finding of guilt of reckless operation after the plea of no contest was a gross abuse of discretion which entitles the state to proceed in mandamus as there is no other remedy such as appeal that is effective to correct the injustice. That argument is not well taken. The denial of the right to appeal a final judgment of the trial court in favor of the defendant in a criminal case is required by federal and' Ohio constitutional protections against double jeopardy. The constitutional guarantees against double jeopardy cannot be frustrated by mandamus, even if the trial court ignored the law or facts in arriving at its verdict.
Brandenburg was placed in jeopardy at the time the trial court exercised its discretion to accept a no contest plea. See United States v. Martin Linen Supply Co. (1977), 430 U. S. 564. The trial court’s finding of guilt of reckless operation constituted a finding of not guilty of the charge of operating an automobile under the influence of alcohol. For purposes of double jeopardy, this case is no different than had the trial court found defendant not guilty of any *383offense after accepting the plea of no contest. Thus, so far as the charge of driving while intoxicated is concerned, there has been a final determination of not guilty irrespective of whether, in arriving at that determination, the trial court grossly abused its discretion or erroneously determined that reckless operation is a lesser-included offense of the principal charge.
Mandamus will not be ordered if the result is to mandate a vain act. State, ex rel. Freeman, v. Valentine (1971), 25 Ohio St. 2d 184. The writ of mandamus granted by the Court of Appeals is a vain act because the result is to unconstitutionally place defendant twice in jeopardy for driving while under the influence of alcohol.
Moreover, E. C. 2731.03 provides as follows:
“The writ of mandamus may require an inferior tribunal to exercise its judgment, or proceed to the discharge of any of its functions, but it cannot control judicial discretion.”
The trial court has exercised its judgment and proceeded to a final verdict in this case. Mandamus is not available to control the court’s discretion, even if grossly abused.
We do not imply by this decision that we approve of the manner in which the case was handled by the trial court. The Code of Judicial Conduct requires that a judge respect and comply with the law and be faithful to the law. Canons 2A and 3A(1). The facts in this case conceded by the no contest plea indicate that defendant was guilty of the offense of driving under the influence of alcohol. A finding of guilt of a lesser offense, whether technically lesser included or not, is not justified on the basis of the case being “a hardship case.” The trial court simply failed to follow the law. The fact that the ease was a hardship ease could properly be considered by the trial court only in the exercise of judicial discretion in determining the penalty to be applied. Moreover, had the prosecutor or the arresting officers assented to the reduction the judgment would also have not been in accordance with the law *384and facts when the reduction is based upon “hardship.”
The writ of mandamus was erroneously issued by the Court of Appeals. The judgment of the Court of Appeals is reversed.
Judgment reversed.
O ’Neill, C. J., Herbert, Celebrezze, McCormac, P. Brown, Sweeney and Locher, JJ., concur. McCormac, J., of the Tenth Appellate District, sitting for W. Brown, J.