In case the person so arrested shall neglect or refuse to give said undertaking in the manner required by said magistrate or judge, he may issue a warrant of commitment against such person, which shall be delivered to said sheriff or other officer, whose duty it shall be to convey such person to the jail mentioned in said warrant, and the said person shall remain in confinement until he shall be removed to the grand jury and to the court, for the purpose of giving his testimony, or until he shall have given the undertaking required by said magistrate or judge.
Okla. Stat. tit. 22, § 275