(a) If a witness, required to enter into an undertaking to appear and testify, either with or without sureties, refuses compliance with the order for that purpose, the magistrate shall commit him or her to prison until he or she complies or is legally discharged.
(b) If a witness fails to appear at the preliminary hearing in response to a subpoena, the court may hear evidence, including testimony or an affidavit from the arresting or interviewing officer, and if the court determines on the basis of the evidence that the witness is a material witness, the court shall issue a bench warrant for the arrest of the witness, and upon the appearance of the witness, may commit him or her into custody until the conclusion of the preliminary hearing, or until the defendant enters a plea of nolo contendere, or the witness is otherwise legally discharged.
The court may order the witness to enter into a written undertaking to the effect that he or she will appear and testify at the time and place ordered by the court or that he or she will forfeit an amount that the court deems proper.
(c) Once the material witness has been taken into custody on the bench warrant he or she shall be brought before the magistrate issuing the warrant, if available, within two court days for a hearing to determine if the witness should be released on security of appearance or maintained in custody.
(d) A material witness shall remain in custody under this section for no longer than 10 days.
(e) If a material witness is being held in custody under this section the prosecution is entitled to have the preliminary hearing proceed, as to this witness only, within 10 days of the arraignment of the defendant. Once this material witness has completed his or her testimony the defendant shall be entitled to a reasonable continuance.
(Amended by Stats. 1987, Ch. 828, Sec. 53.)