
26 Cal.App.2d 418 (1938)
In the Matter of the Application of BRUCE BAGWELL for a Writ of Habeas Corpus Ad Testificandum.
Crim. No. 1628. 
California Court of Appeals. Third Appellate District.  
May 18, 1938.
 Howard B. Crittenden, Jr., for Petitioner.
 U.S. Webb, Attorney-General, Gordon S. Hughes, Deputy Attorney-General, F. C. Clowdsley, District Attorney, and Raymond M. Dunne, Deputy District Attorney, for Respondent. *419
 Pullen, P. J.
 This is a petition filed by Bagwell for a writ of habeas corpus ad testificandum.
 While petitioner Bagwell was confined in a cell in the San Joaquin county jail with one William Lewis, a quarrel arose between the two, during which Lewis struck Bagwell, inflicting the injury hereinafter referred to. Bagwell, after being committed to San Quentin prison, filed a civil suit against the sheriff of the county of San Joaquin for the injury alleged to have been caused by his fight with Lewis, upon the theory the sheriff was guilty of negligence in confining Lewis, whom petitioner alleged was an habitual criminal with a vicious, dangerous and violent character, in the same cell with petitioner. He seeks by this writ to be returned from San Quentin to the county of San Joaquin in order to take part in and to testify in this action against the sheriff.
 It is the contention of petitioner that he is entitled to the writ sued upon, which was, under the common law, used for the production before the court of witnesses in pending actions. This writ is defined by Blackstone as one which issues when it is necessary to remove a prisoner in order to prosecute or bear testimony in any case or to be tried in the proper jurisdiction wherein the act was committed.
 We may consider the claims of petitioner either as they apply to his rights as a witness or as to his rights as a party to the action. Let us consider first his right as a witness.
 [1] In volume 70, page 64, of Corpus Juris, it is said in reference to writ of habeas corpus ad testificandum: "... The power to issue such process is inherent in the courts, and in some jurisdictions is confirmed, but in others superseded by statute."
 There is no doubt but under the common law such rights existed, but where the state has spoken, that supersedes the common law. (Pol. Code, sec. 4468.)
 Section 1997 of the California Code of Civil Procedure apparently has superseded this writ as it applies to a witness, as that section provides: "If the witness be imprisoned in the county jail where the action or proceeding is pending, his production may be required. In all other cases his examination, when allowed, must be taken upon deposition."
 It would appear that the legislature has enacted complete statutes which cover the subject of producing evidence from *420 imprisoned witnesses and is therefore mandatory regardless of what may have been the practice under the old common law writ.
 [2] The action pending in San Joaquin County being a civil case, sections 1333 and 1346 of the Penal Code, which refer to testimony from an imprisoned witness in criminal cases, are not applicable, but even in criminal cases it is within the discretion of the court to order that the testimony of witnesses may be produced by deposition when such witness is confined to a jail or prison.
 [3] By article I, section 13, of the Constitution of California, the party accused has a right, in a criminal prosecution, to compel attendance of a witness in his behalf, but even that does not mean to attend in person, and depositions may be substituted for the testimony of the imprisoned witness. (People v. Putman, 129 Cal. 258 [61 P. 961].) The court there said that the production of such witnesses does not issue as a matter of right, but rests in the discretion of the court.
 In Castera v. Superior Court, 29 Cal.App. 694 [159 P. 735], it was held that a defendant in a civil case could not be compelled to wait until the imprisoned plaintiff was released, but had the right to proceed to trial forthwith. It would seem from this case that a plaintiff was not to be released from prison for the purpose of prosecuting a civil action.
 The case of People v. Sebring, 14 Misc. 31 [35 N.Y. Supp. 237], cited by petitioner, was a criminal proceeding where witnesses were unwillingly produced before a grand jury in a criminal matter, and is not helpful here.
 [4] Turning now to the question of the right of petitioner to appear in person as a party to the action, it must be recalled that defendant is a prisoner in the state prison, having been convicted of a felony, and under the provisions of the Penal Code, section 673, his civil rights are suspended. It must also be recalled that if the common law was being applied, defendant having been convicted of forgery, which was and is an infamous crime, would be disqualified from testifying as a witness, and therefore, under the common law which he invokes, would not be entitled to the writ sought. Furthermore, the expense of transporting petitioner, together with the necessary guards and maintenance, could not be assessed as a charge against the state of California, for this trip, being one for the personal benefit of petitioner and not *421 for the benefit of the state of California, would not justify the expenditure of public money for private use. (Art. IV, sec. 31, Const.)
 Viewed also from a practical point of view, it would subject the warden to unnecessary risk, as a prisoner could designedly file a petition in some remote county of the state, and in the act of transportation could, by prearrangement, meet confederates who would effect his release. For that reason also this court should view with caution any order which by this procedure would open the prison doors.
 Respondent has raised the question that this court has no jurisdiction to consider this petition as the writ is directed to the warden of San Quentin prison, which is located in Marin County and without the jurisdiction of the Third District Court of Appeal.
 We do not believe that we need pass upon this question, however, as it is our view of the matter that petitioner is not entitled to the writ, and the same should be and therefore is denied.
 Plummer, J., and Thompson, J., concurred.
