The discharge of a defendant under either of sections 29-21-08 and 29-21-09 is an acquittal of the offense charged in the information or indictment, or any offense of which that person might have been found guilty thereunder, and is a bar to another prosecution therefor.
N.D.C.C. § 29-21-10