If it appears during the trial and before submission to the jury or court, that a mistake has been made in charging the proper offense in the indictment or information, the court may order a discontinuance of trial without prejudice to the prosecution. The accused, if there is good cause to detain him, may be recognized to appear at the same or next succeeding term of court, or in default thereof committed to jail. In such case the court shall recognize the witnesses for the state to appear at the same time and testify.
R.C. §2945.14