If in a felony case the magistrate sets the preliminary examination beyond the time specified in Section 859b, in violation of Section 859b, or continues the preliminary hearing without good cause and good cause is required by law for such a continuance, the people or the defendant may file a petition for writ of mandate or prohibition in the superior court seeking immediate appellate review of the ruling setting the hearing or granting the continuance. Such a petition shall have precedence over all other cases in the court to which the petition is assigned. If the superior court grants a peremptory writ, it shall issue the writ and a remittitur three court days after its decision becomes final as to the court if this action is necessary to prevent mootness or to prevent frustration of the relief granted, notwithstanding the rights of the parties to seek review in a court of appeal. When the superior court issues the writ and remittitur as provided in this section, the writ shall command the magistrate to proceed with the preliminary hearing without further delay, other than that reasonably necessary for the parties to obtain the attendance of their witnesses.
The court of appeal may stay or recall the issuance of the writ and remittitur. The failure of the court of appeal to stay or recall the issuance of the writ and remittitur shall not deprive the parties of any right they would otherwise have to appellate review or extraordinary relief.
Ca. Pen. Code § 871.6