When, however, any material witness on the part of the people has been discharged on his undertaking, without surety, if afterwards, on the sworn application of the district attorney or other person on behalf of the state, made to the magistrate or to any judge, it satisfactorily appears that the presence of such witness or any other person on the part of the people is material or necessary on the trial in court, such magistrate or judge may compel such witness, or any other material witness on the part of the state, to give an undertaking with sureties, to appear on the said trial and give his testimony therein; and, for that purpose, the said magistrate or judge may issue a warrant against such person, under his hand, with or without seal, directed to a sheriff, marshal or other officer, to arrest such person and bring him before such magistrate or judge.
Okla. Stat. tit. 22, § 274