an Offense. If it appears to the court, by affidavit or otherwise, or upon the inspection of the process or warrant of commitment and such other papers in the proceedings as may be shown to the court, that the party is guilty of a criminal offense, or ought not to be discharged, the court, although the charge is defective or unsubstantially set forth in such process or warrant of commitment, shall cause the complainant or other necessary witnesses to be subpoenaed to attend at such time as ordered, to testify before the court; and upon the examination he may discharge the party, release him pursuant to Chapter 40 (commencing with § 40.10) or recommit him to custody as may be just and legal.
COL120106
NOTE: Section 135.42 is substantively the same as former § 1489. See also Cal. Pen. Code § 1489 (same).