
918 S.W.2d 25 (1996)
Daniel Carl NORTON, Appellant,
v.
The STATE of Texas, Appellee.
No. 14-95-00114-CR.
Court of Appeals of Texas, Houston (14th Dist.).
January 18, 1996.
*26 Stanley G. McGee, Angleton, for appellant.
David Bosserman, Angleton, for appellee.
Before HUDSON, EDELMAN and ELLIS[*], JJ.

CORRECTED MAJORITY OPINION
EDELMAN, Justice.
Daniel Carl Norton appeals the trial court's denial of his application for writ of habeas corpus on the ground that the State failed to indict him within two court terms from the date of his arrest. We reverse.
On January 9, 1994, appellant was arrested for delivery of marijuana and bond was set. Appellant was released on bond on January 18. On October 6, 1994, an indictment against appellant for delivery of marijuana was issued and filed in the 23rd District Court.
Appellant filed a petition for writ of habeas corpus on October 25, complaining of violation of his right to a speedy trial and the State's failure to present an indictment against him in the next term of court after his commitment or admission to bail. See TEX.CODE CRIM.PROC.ANN. art. 32.01 (Vernon 1989). Appellant requested that the trial court dismiss the charges against him with prejudice. See id. art. 28.061.
On January 6, 1995, the hearing on the appellant's petition for writ of habeas corpus was held before the judge of the 239th District Court, rather than the 23rd District Court where the indictment was filed. The trial court denied the application on the *27 ground that, although two terms of the 23rd District Court had passed, the term of the 239th District Court was controlling, and a second term of that court had not passed from the time of arrest to the time of indictment.
In his sole point of error, appellant claims that the trial court erred in denying his application for writ of habeas corpus by failing to dismiss the prosecution with prejudice under articles 32.01 and 28.061 because, following his arrest, he was not indicted before the end of the second term of the 23rd District Court.

Timeliness of Indictment
Article 32.01 reads as follows:
Defendant in custody and no indictment presented
When a defendant has been detained in custody or held to bail for his appearance to answer any criminal accusation before the district court, the prosecution, unless otherwise ordered by the court, for good cause shown, supported by affidavit, shall be dismissed and the bail discharged, if indictment or information be not presented against such defendant at the next term of the court which is held after his commitment or admission to bail.
Article 28.061 provides that a discharge under it or article 32.01 is a bar to any further prosecution for the offense discharged and for any other offense arising out of the same transaction.
In Brazoria County, the terms for the 23rd District Court begin on the first Monday in April and October, and are designated the April-September and October-March terms. TEX.GOV'T CODE ANN. § 24.124(b) (Vernon 1988). The terms for the 239th District Court begin on the first Monday in January and July of each year. Id. § 24.302.
In this case, the State arrested appellant on January 9, 1994, but did not indict him until October 6, 1994. Therefore, from the date of arrest until the date of indictment, a second term had run for the 23rd District Court but not the 239th District Court. Thus, the timeliness of the indictment depends upon the court to which the statute applies under these facts.
In any county in which there are two or more district courts, the judges of those courts may, on their own motion, transfer any criminal case or proceeding from their dockets to the docket of one of those other district courts. Id. § 24.303. Alternatively, those judges may simply exchange benches without changing the docket of the case. See id. While a formal order is needed to effect a transfer of cases, no such order is needed for an exchange of benches. See Davila v. State, 651 S.W.2d 797 (Tex.Crim.App.1983).
The State contends that this case was transferred to the 239th District Court, but admitted in oral argument that the record before us on appeal does not reflect any such formal transfer. In addition, all papers relating to the action, including the caption of the State's brief on appeal, indicate that the cause remained before the 23rd District Court. Thus, even if a transfer of the case from the 23rd District Court could have changed the applicable term of court for purposes of article 32.01,[1] we have no basis to conclude that such a transfer took place in this case. Moreover, if the case was transferred after the indictment, since the relevant time period under article 32.01 is from arrest to indictment, the term of the court in which the case was pending during that period, the 23rd District Court in this case, should control. Accordingly, because the second term of the 23rd court passed before the appellant was indicted, the indictment was not timely for purposes of article 32.01.

Mootness
Article 28.061 provides that a discharge under article 32.01 is to be with prejudice. However, the State claims that this relief should be denied because dismissal was not sought before the indictment was obtained. See Wilkinson v. State, 899 S.W.2d 20, 21-22 (Tex.App.San Antonio 1995, n.w.h.); Garay v. State, 683 S.W.2d 21, 22 (Tex.App.Waco 1984, pet. ref'd); Tatum v. State, 505 S.W.2d 548, 550 (Tex.Crim.App. 1974). Except for Wilkinson, however, the *28 cases cited by the State for this proposition preceded the 1987 amendment of article 28.061 which made it applicable to article 32.01.[2]
Prior to that amendment of article 28.061, there was no right to dismissal with prejudice for a violation of article 32.01. Instead, the State was free to refile charges after a trial court dismissed a case pursuant to article 32.01. In that event, article 32.01 provided a defendant only a temporary dismissal of charges. Within that legal context, the rationale for Tatum and Garay may have been that once the effort to obtain an indictment was expended, it was no longer reasonable to dismiss a case and thereby require that the effort to indict be duplicated after refiling. See Garay, 683 S.W.2d at 22.
However, with the passage of the 1987 amendment to article 28.061, such a rationale no longer applies since a case is dismissed with prejudice if the indictment is not timely under article 32.01. Moreover, to hold otherwise would be to disregard the plain language of those statutes. Therefore, we hold that the filing of an indictment before a habeas corpus hearing no longer renders such a dismissal moot, and differ with the opinion in Wilkinson to that extent.[3]

Constitutionality
The State contends that even if the issue is not moot, the trial court was still correct in denying habeas corpus relief because articles 28.061 and 32.01 are unconstitutional.[4] In support of this argument, the State cites the reasoning of Meshell v. State, 739 S.W.2d 246 (Tex.Crim.App.1987), which held article 32A.02 of the Code of Criminal Procedure (the Texas Speedy Trial Act) unconstitutional. Meshell, 739 S.W.2d at 257; see TEX.CODE CRIM.PROC.ANN. art. 32A.02 (Vernon 1989). Because the Texas Speedy Trial Act failed to incorporate the factors articulated by the United States Supreme Court in Barker[5] to determine whether an accused was denied his constitutional right to a speedy trial,[6] the Court of Criminal Appeals reasoned that article 32A.02 went beyond effectuating constitutional protection and became an impermissible infringement upon the discretion of the prosecuting attorney, thereby violating constitutional separation of powers. Meshell, 739 S.W.2d at 257. The State contends that article 32.01 must *29 incorporate these same factors so as to not infringe upon the discretion of the prosecuting attorney. We disagree.
Article 32.01 protects an accused from being arrested without being formally charged by indictment or information within a specified time. Requiring the State to formally charge a defendant within a specified time is far less burdensome than requiring it to be ready for trial within a specified time. In addition, article 32.01 allows the State between six and twelve months to bring an indictment or information, whereas article 32A.02 required the State to be ready for trial in no more than 180 days. Thus, in contrast to article 32A.02, article 32.01 is not a speedy trial act, and infringes much less on the discretion of the prosecutor.
Lastly, article 32.01 provides an exception to dismissal where good cause is shown. This procedural safeguard allows the prosecutor to present factors such as those in Barker or otherwise that might justify an untimely indictment. For these reasons, we do not believe that article 32.01 infringes on prosecutorial discretion so unreasonably as to violate constitutional separation of powers.
Accordingly, because two terms of the 23rd Court had expired before the appellant was indicted, because the 1987 amendment to article 28.061 no longer makes the habeas corpus hearing moot when the State files an indictment prior to the hearing, and because article 32.01 is not unconstitutional for infringing upon prosecutorial discretion, we sustain appellant's point of error, reverse the judgment of the trial court, and remand the case to the district court with instructions to dismiss the prosecution.
Judgment Rendered and Majority and Concurring Opinions filed January 18, 1996.
HUDSON, Justice, concurring.
Appellant was arrested on January 9, 1994. Nine days later, he was released on bond. Because the months of April and October mark the terms of the 23rd District Court of Brazoria County,[1] the State was required to obtain an indictment before the first Monday in October, i.e., October 3, 1994.[2] The grand jury returned an indictment on October 6, 1994. Appellant sought dismissal of the charge and a bar to further prosecution. The trial court denied appellant's request.
A trial court does not ordinarily possess the authority to dismiss a criminal case without the prosecutor's consent.[3] A statutory exception to this rule exists where the State fails to secure an indictment in a timely manner. TEX.CODE CRIM.PROC.ANN. art. 32.01 (Vernon 1989). The State contends the statute unconstitutionally infringes upon its prosecutorial discretion.[4] Under the separation of powers doctrine, the Legislature may not abridge the exclusive prosecutorial functions of a district attorney unless expressly authorized by a constitutional provision. Meshell v. State, 739 S.W.2d 246, 254-55 (Tex.Crim.App.1987).
If there is constitutional support for Article 32.01, the State claims it must be found in a defendant's constitutional right to a speedy trial guaranteed by TEX. CONST. art. I, § 10. Four factors must be considered when deciding whether a defendant's right to a speedy trial has been infringed: 1) the length of the delay before trial, 2) the reason for the delay, 3) the defendant's assertion of his right to a speedy trial, and 4) any prejudice to a defendant resulting from that delay in trial. Hull v. State, 699 S.W.2d 220, 221 (Tex.Crim.App. 1985). Because a dismissal under Article 32.01 may be obtained without regard to the last two factors, the State contends the statute *30 suffers from the same unconstitutional infirmity found in the Texas Speedy Trial Act. In Meshell, the court of criminal appeals concluded that Article 32A.02 was unconstitutional because it infringed upon the prosecutor's discretion in preparing for trial without actually securing a speedy trial for the defendant. Meshell, 739 S.W.2d at 257.
Like the Speedy Trial Act, Article 32.01 does not guarantee the defendant a speedy trial, only a speedy indictment. Yet, it compels dismissal of the prosecution without regard to whether the defendant has been prejudiced by the delay or has even made a request for a speedy trial. In this regard, I believe Article 32.01 is indistinguishable from Article 32A.02. Under the rationale of Meshell, the validity of Article 32.01 as a statutory mechanism for the enforcement of a defendant's right to a speedy trial is suspect.
I concur in the result reached by the majority only because I believe there is another constitutional provision authorizing the legislative enactment. The Texas constitution provides that "no person shall be held to answer for a criminal offense, unless on an indictment of a grand jury." TEX. CONST. art. I, § 10. Here appellant was "held" for ten months to answer for a criminal offense without the indictment of a grand jury.[5]
I would hold that the purpose of Article 32.01 is not to guarantee a speedy trial, but to enforce a defendant's constitutional right to indictment by a grand jury. The statute interferes to some extent with the prosecutor's discretion, but its mandate to secure an indictment before the expiration of the next term after a defendant's arrest is not unreasonable. Moreover, the statute provides that if unusual circumstances frustrate the State's attempts to secure an indictment within the statutory time limits, an extension may be obtained upon a showing of good cause supported by affidavit. For these reasons, I believe Article 32.01 does not improperly infringe upon the prosecutor's discretion.
Because the State failed to comply with the terms of Article 32.01, appellant contends the prosecution should be dismissed with prejudice as required by Article 28.061. Appellant makes no claim that he was harmed by the State's delay in obtaining the indictment. Rather, appellant seeks to escape criminal prosecution solely because the State was four days late in obtaining an indictment. While the wisdom of a statute which provides immunity from prosecution for technical violations of procedural statutes may be debated, it is well established that it is within the purview of the legislature to enact foolish statutes. Williams v. State, 707 S.W.2d 40, 44 (Tex.Crim.App.1986); Ex parte Francis, 72 Tex.Crim. 304, 165 S.W. 147, 154 (1914). With these observations, I reluctantly concur.
NOTES
[*]  Justice George T. Ellis sitting by assignment.
[1]  We have found no authority on this issue and express no opinion on it.
[2]  See Act of May 20, 1977, 65th Leg., R.S., ch. 787, s 4, 1977 Tex.Gen.Laws 1970, 1972, amended by Act of May 22, 1987, 70th Leg., R.S., ch. 383, ss 1, 4, 1987 Tex.Gen.Laws 1885, 1887 (effective for offenses committed on or after Sept. 1, 1987). The former version of article 28.061 did not mention article 32.01:

If a motion to set aside an indictment, information, or complaint for failure to provide a speedy trial as required by Article 32A.02 is sustained, the court shall discharge the defendant. A discharge under this article is a bar to any further prosecution for the offense discharged or for any other offense arising out of the same transaction.
[3]  Although Wilkinson was decided after the 1987 amendment to 28.061 became effective, it did not address the 1987 amendment. See 899 S.W.2d at 21. In fact, it was not until August 24, 1995 that any court of appeals announced a different result under the 1987 amendments. See Ex Parte Knight, 904 S.W.2d 722, 725 (Tex.App.Houston [1st Dist.] 1995, pet. ref'd).
[4]  In Nix and Nguyen the First Court of Appeals considered whether article 28.061 was a constitutional enforcement mechanism for article 32.01. See Nix v. State, 882 S.W.2d 474, 475-76 (Tex.App.Houston [1st Dist.] 1994, pet. ref'd); Nguyen v. State, 882 S.W.2d 471, 472-73 (Tex. App.Houston [1st Dist.] 1994, pet. ref'd). In each of those cases, the State argued that in Meshell v. State, 739 S.W.2d 246 (Tex.Crim.App. 1987), the Court of Criminal Appeals had totally invalidated article 28.061 when it declared article 32A.02 unconstitutional. In both cases, the First Court of Appeals rejected that argument and held article 28.061 was unconstitutional only when used as an enforcement provision to article 32A.02, but not article 32.01.

By contrast, in this case, the State argues that article 32.01 is itself unconstitutional, and as a result, that article 28.061 is unconstitutional as an enforcement mechanism for it. The First Court of Appeals did not address the constitutionality of article 32.01 in Nix or Nguyen. See Nix, 882 S.W.2d at 476 n. 2; Nguyen, 882 S.W.2d at 473 n. 2.
[5]  Barker v. Wingo, 407 U.S. 514, 92 S.Ct. 2182, 33 L.Ed.2d 101 (1972).
[6]  The factors considered when a trial is delayed include (1) the length of the delay before trial, (2) the reason for the delay before trial, (3) the defendant's assertion of his right to a speedy trial, and (4) any prejudice resulting from delay of the trial. Barker, 407 U.S. at 531, 92 S.Ct. at 2192.
[1]  TEX.GOV'T CODE ANN. § 24.124(b) (Vernon 1988).
[2]  TEX.CODE CRIM.PROC.ANN. art. 32.01 (Vernon 1989).
[3]  State v. Johnson, 821 S.W.2d 609, 613 (Tex. Crim.App.1991).
[4]  The separation of powers clause is found in TEX. CONST. art. II, § 1:

The powers of the Government of the State of Texas shall be divided into three distinct departments, each of which shall be confided to a separate body of magistracy, to wit: Those which are Legislative to one, those which are Executive to another, and those which are Judicial to another; and no person, or collection of persons, being of one of these departments, shall exercise any power properly attached to either of the others, except in the instances herein expressly permitted.
[5]  A person who is subject to the conditions of a bond is constructively "restrained" in his liberty. Ex parte Robinson, 641 S.W.2d 552, 553 (Tex. Crim.App.1982).
