Whenever no sufficient bail is offered, and the prisoner is committed to jail, the magistrate before whom the examination was had, shall certify upon the mittimus issued by him, the sum for which bail was required, and if the prisoner shall offer sufficient bail for such sum to the clerk of the court wherein the prisoner was committed for trial, it shall be taken by said clerk and the prisoner shall be discharged.
MCL 766.17