When the court has ordered a removal of the action, it may require the accused, if the offense be then bailable, to enter into an undertaking with good and sufficient sureties to be approved by the court, in such sum as the court may direct conditioned for his appearance in the court to which the action has been removed, on the first day of the next term thereof, and to abide the order of such court; and in default of such undertaking, a warrant shall be issued to the sheriff or other proper officer commanding him safely to keep the prisoner and at the proper time to convey him to the jail of the county where he is to be tried, there to be safely kept by the jailer thereof until discharged by due course of law.
R.L.1910, § 5819.