I concur in the judgment. The statute certainly does not give the defendant in a criminal action an absolute right to an order for the attendance as witness of a convict imprisoned in the state prison. It gives a guarded and limited right to the prosecution (subject to the discretion of the court) to *461have such an order, but it does not in terms give such a right to the defendant, either absolutely or upon conditions.
The general provision of section 1567 of the Penal Code, authorizing an order for the production of a prisoner “ when it is necessary,” is not confined to cases in which the prisoner may be needed as a witness. It applies equally where he is needed for any other purpose, as, for instance, where it is desired to try him upon some charge other than that upon w'hich he has been imprisoned, and the whole object of the section is to prescribe the manner of procuring his presence when needed. We must look to other portions of the statute to discover the cases in which his presence is necessary.
Ho section of the statute has been cited, and I know of none, which makes his presence necessary as a witness, or provides for an order for his production, except section 1333, Penal Code, by which the privilege of securing his attendance is confined to the prosecution exclusively, subject to the discretion of the court to deny the order.
And there is good reason for making this discrimination in behalf of the state. The defendant may in all cases have the benefit of the prisoner’s deposition. In cases of homicide the state cannot have it. (Const., art. I., sec. 13.) And besides, the district attorney, acting as he does in the interest of the public and under the obligations of his oath of office, will not abuse the privilege; but there is not only no security that defendants in criminal cases would not abuse it; it is highly probable they would, and the worse the criminal the more probable the abuse.
It being clear to my mind that the right contended for by the petitioner is not secured to him by statute, the only remaining question is whether it is secured by the constitution.
By section 18, article 1, it is provided that in criminal prosecutions the party accused shall have the right to *462compulsory process to compel the attendance of witnesses in his behalf, and I am willing to concede that the provision is self-executing. But what does it mean?
Substantially the same provision is found in the sixth amendment to the constitution of the United States, and in the oi’ganic law of several of our sister states. We have not been cited by counsel to these provisions or the construction they have received, and without the time to investigate the question more thoroughly I do not care to express an opinion as to the exact limits of the right conferred by this clause of the constitution. I feel very sure, however, that it does not mean, and that it never was intended, that on the mere demand of a defendant in a criminal action, any convict or any number of convicts must be transported from the state prison to the place of trial as an essential prerequisite to proceeding with the trial. It is not possible that the court or judge to whom application is made has no discretion to examine the sufficiency of the grounds upon which it is based, and to deny it if, in his opinion, it ought to be denied.
If this is so, mandamus will not lie to compel the making of the order. We may by mandamus compel the superior court to act,—we cannot prescribe what action it shall take. It has jurisdiction to decide upon the application, and if it decides erroneously, the only remedy is by appeal from the judgment on bill of exceptions.