If the accused pleads guilty the plea shall be recorded on the indictment, and the accused may be placed in the custody of the sheriff until sentence.