If a return be made, which raises a question as to a matter of fact essential to the determination of the motion, and affecting the substantial rights of the parties, and upon the supposed truth of the allegation of which the application for the writ is based, the court may, in its discretion, order the question to be tried before a jury, and postpone the argument until such trial can be had, and the verdict certified to the court. The question to be tried must be distinctly stated in the order for trial, and the county must be designated in which the same shall be had. The order may also direct the jury to assess any damages which the applicant may have sustained, in case they find for him.
Ca. Civ. Proc. Code § 1090