
465 S.W.2d 164 (1971)
STATE of Texas, ex rel. Leslie B. VANCE, District Attorney, 52nd Judicial District, Relator,
v.
J. F. CLAWSON, Jr., Judge, 169th Judicial District Court, sitting as Judge for the 52nd Judicial District Court, Respondent.
No. 44043.
Court of Criminal Appeals of Texas.
March 31, 1971.
*165 Bob Burleson, Jack M. Tarver, Temple, for respondent.
Leslie B. Vance, Dist. Atty., Gatesville, and Jim D. Vollers, State's Atty., Austin, for the State.

OPINION
OPINION, Presiding Judge.
This is an action seeking the issuance of Writ of Prohibition against the respondent J. F. Clawson, Jr., Judge of the 169th Judicial District Court of Bell County, Texas.
Leave to file the application for writ of prohibition was granted and the application *166 is before this court upon petition and answer supported by brief and oral argument.
The record reflects that one Johnnie Pruett was indicted in Coryell County on April 15, 1969, for the offense of sodomy alleged to have occurred "on or about" April 11, 1969.
On July 25, 1969, Pruett waived trial by jury and entered a plea of nolo contendere before the 52nd Judicial District Court to the charge against him. His punishment was assessed at two years' confinement in the Texas Department of Corrections. On September 3, 1969, he was formally sentenced. At such time the trial judge gave him credit on his sentence from July 25, 1969, for some of the time spent in custody prior to sentence. Notice of appeal was then given.
Pruett's conviction was affirmed on appeal, Pruett v. State, 463 S.W.2d 191, with this court upholding the constitutionality of Article 524, Vernon's Ann.P.C., as to forcible sodomy despite the holding in Buchanan et al. v. Batchelor et al., D.C., 308 F. Supp. 729, that such statute was "void on its face for unconstitutional overbreath." This court relied in part upon Lawrence v. Woods, 8 Cr.L. 2084, as "recent authority to support the view that state courts are not bound by the rulings of lower Federal courts * * *."
After the motion for rehearing and a temporary stay of mandate at Pruett's request the mandate of this court was issued on March 3, 1971, commanding the trial court "to observe the order of our said Court of Criminal Appeals in this behalf and in all things to have it duly recognized, obeyed and executed."
Thereafter Pruett's attorney filed a motion seeking credit upon such sentence for the time Pruett had lain in jail pending appeal. Such motion was presented to the respondent Clawson, Judge of the 169th Judicial District Court sitting in the 52nd Judicial District Court of Coryell County by administrative assignment.
A brief was apparently offered in support of such motion citing Articles 42.03 and 42.09, Vernon's Ann.C.C.P.; North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656; Robinson v. Beto, 5 Cir., 426 F.2d 797, and this court's decision in Ex parte Griffith, Tex.Cr.App., 457 S. W.2d 60. The brief also urged Pruett be given additional credit on his sentence under the provisions of Article 5118a, Vernon's Ann.Civ.St. Testimony was then offered in support of such motion which reflected that Pruett had been in custody under the indictment in question since April 15, 1969.
At the conclusion of the hearing the respondent Clawson noted that on the date of the hearing (March 8, 1971) Pruett was entitled to credit for or to have subtracted from his two year sentence "19 months and 14 days spent in jail pending appeal."[1] In addition the trial court concluded Pruett was entitled to "good time credit equal to 1/3 of the days actually served in jail in the amount of 6 months and 24 days." See Article 5118a, V.A.C.S.
The trial court in its order then "subtracted" the 19 months and 14 days from the original sentence leaving 4 months and 16 days on the original sentence which, "after allowing `good time' credit of 6 months and 24 days" the court "considered" the original sentence "fully served." Pruett was then ordered "released and discharged from custody."
Nothing in the record before us reflects that at that particular time the relator objected to or protested the respondent's actions.
*167 At the outset there can be no question but that Pruett was entitled to the pre-sentence custody credit granted him at the time of his sentence. See Article 42.03, V.A.C.C.P.; Gremillion v. Henderson, 5 Cir., 425 F.2d 1293; Ex parte Griffith, Tex.Cr.App., 457 S.W.2d 60. And such credit is not lost by the fact that notice of appeal is given. Ex parte Griffith, supra. However, the sentencing judge having exercised his discretion to give credit for all or a part of a defendant's pre-sentence custody, another judge, even one sitting in the same court, may not after conviction again exercise discretion as to pre-sentence custody. Ex parte Washburn, Tex.Cr. App., 459 S.W.2d 637.
And it is true that under the decision of this court in Ex parte Griffith, supra, the trial court had not only the right but the duty to grant to Pruett credit for the 18 months he had lain in jail pending appeal.
And under the provisions of Article 42.09, V.A.C.C.P., where an appeal has been taken and the defendant is in custody, the sentence begins to run on the date of the mandate. Therefore there is no question that Pruett was entitled to the 5 day credit from March 3 to March 8, 1971, even without court order.
There can be then no quarrel with the 19 months and 14 days credit granted Pruett by the respondent.
The real question presented is the trial court's authority to grant any "good time" credit under the provisions of Article 5118a, V.A.C.S., and then to order Pruett's release.
Such statute provides:
"In order to encourage county jail discipline, a distinction may be made in the terms of prisoners so as to extend to all such as are orderly, industrious and obedient, comforts and privileges according to their deserts; the reward to be bestowed on prisoners for good conduct shall consist of such relaxation of strict county jail rules, and extension of social privileges as may be consistent with proper discipline. Commutation of time for good conduct, industry and obedience may be granted the inmates of each county jail by the sheriff in charge. A deduction in time not to exceed one third (1/3) of the original sentence may be made from the term or terms of sentences when no charge of misconduct has been sustained against the prisoner. This Act shall be applicable regardless of whether the judgment of conviction is a fine or jail sentence or a combination of jail sentence and fine. A prisoner under two (2) or more cumulative sentences shall be allowed commutation as if they were all one sentence. For such sustained charge of misconduct in violation of any rule known to the prisoner (including escape or attempt to escape) any part or all of the commutation which shall have accrued in favor of the prisoner to the date of said misconduct may be forfeited and taken away by the sheriff. No other time allowance or credits in addition to the commutation of time for good conduct herein provided for may be deducted from the term or terms of sentences. The sheriff shall keep or cause to be kept a conduct record in card or ledger form and a calendar card on each inmate showing all forfeitures of commutation time and the reasons therefor."
Such statute was first enacted in 1955 and was amended in 1963 following Attorney General's Opinion WW 1326 (May 2, 1962) which held that the act had no application to jail prisoners whose sole punishment consisted of a fine and court costs and who is "laying out' such fine and costs. See Article 45.53 (former Art. 920), V.A.C.C.P.
It is clear from the history and the wording of the present statute that the same is applicable only to misdemeanor "terms of prisoners * * * regardless of whether the judgment of conviction is a *168 fine or jail sentence or a combination of jail sentence and fine." Attorney General's Opinion C-310 (Sept. 17, 1964) expressly held that Article 5118a, supra, had no application "to a prisoner incarcerated in county jail under a sentence calling for imprisonment in the penitentiary * * *."
In the case at bar the punishment assessed does not consist of a term in the county jail but of a felony sentence to be served in the Texas Department of Corrections. In cases where, following a felony conviction, a prisoner is confined in jail pending appeal because of financial inability to make an appeal bond or where the punishment is in excess of 15 years (Article 44.04, V.A.C.C.P.), such prisoner is not serving a "term" in the county jail so as to render the provisions of Article 5118a, supra, applicable.[2]
Even if this were not, so, there is another reason why Article 5118a, supra, is not applicable in the case at bar. Such statute provides that the sheriff shall have the sole discretion in granting commutation of time of those prisoners in his custody serving jail terms in the county jail. See Attorney General's Opinion C-310, supra. In Attorney General's Opinion WW 1326, supra, it was written: "The judge of the court in which the prisoner was convicted has no powers or authority under Article 5118a, V.A.C.S."
At the hearing on the motion for credit on the sentence following receipt of this court's mandate Sheriff Cummings of Coryell County testified he had not kept a conduct record card or ledger on Pruett, and it appears the sheriff made no effort to grant Pruett any commutation of his time or expressed any desire to do so. In fact, Attorney General's Opinion C-310, supra, holds that the sheriff cannot make any commutation of a felony sentence.
Having thus determined that the trial judge had no authority to grant credit under the provisions of Article 5118a, V.A. C.S., and to that extent that his order is void, we next turn to the question of whether a writ of prohibition will lie under the circumstances described.
"The Court of Criminal Appeals is the court of last resort in this state in criminal matters. This being so, no other court of this state has authority to overrule or circumvent its decisions, or disobey its mandates." State ex rel. Wilson v. Briggs, 171 Tex.Cr.R. 479, 351 S.W.2d 892, 894.
The Constitution of this state, Article V, Sec. 5, Vernon's Ann.St., provides that this court and the judges thereof "shall have the power to issue the writ of habeas corpus, and under such regulations as may be prescribed by law, issue such writs as may be necessary to enforce its own jurisdiction." (emphasis supplied)
There can be no question that this court may issue a writ of prohibition in those cases in which it is necessary to enforce its jurisdiction. 46 Tex.Jur.2d, Prohibition, Sec. 11, p. 460; State ex rel. McNamara v. Clark, 79 Tex.Cr.R. 559, 187 S.W. 760; Gooch v. Fuchs, 170 Tex.Cr.R. 136, 339 S.W.2d 202; State ex rel. Wilson v. Briggs, supra; State v. Klein, 154 Tex. Cr.R. 31, 224 S.W.2d 250.
But we must determine whether the issuance of such writ is applicable under the facts presented by the case at bar.
It has been said that "a writ of prohibition is that process by which a superior court prevents inferior courts, tribunals, officers, or persons from usurping or exercising jurisdiction with which they have not been vested." 73 C.J.S. Prohibition § 1, p. 9.
It is noted though that "Prohibition issues to prevent the commission of a future act and not to undo, nullify, or review *169 an act already performed; it will not be granted when the act sought to be prevented is already done, but will lie when such act is not a full, complete, and accomplished judicial act." 73 C.J.S. Prohibition § 10c, p. 30.
Since, in the case at bar, the respondent Clawson has granted Pruett credit under the provisions of Article 5118a, supra, and released him by order of court, it is clear that the act sought to be prevented is already an accomplished fact. Under these circumstances, we conclude prohibition is not the proper remedy.
In determining whether the issuance of a writ is necessary to protect its jurisdiction this court will not, however, be delimited by the denomination of the pleadings by the relator. The court will look to the essence of the pleadings, including the prayers therein as well as the record before the court. When that is done in this case it is apparent that relator is not seeking to restrain future acts but seeking to have this court direct the respondent Clawson to set aside an order already entered insofar as said order is invalid. Thus it is apparent that the relator is in fact seeking a writ of mandamus.[3]
We conclude that the issuance of a writ of mandamus is necessary in order to protect this court's jurisdiction and to insure that the mandate of this court not be thwarted and the relator has no other adequate remedy.
The respondent is directed to set aside that portion of the order granting Pruett "good time" credit on his sentence under Article 5118a, supra, to issue a capias for Pruett's arrest (Cf. Article 44.05, V.A.C. C.P.) and to perform the ministerial duty of carrying out the mandate of this court.
We assume that the respondent will immediately perform his duty as herein set out. Writ of mandamus will issue only if he refuses to do so.
No motion for rehearing will be entertained.
It is so ordered.
ROBERTS, J., not participating.
NOTES
[1]  This figure was apparently arrived at by considering the 39 days of pre-sentence custody for which Pruett had been given credit at the time of sentence on September 3, 1969, the 18 months from the date of sentence to date of the mandate (March 3, 1971) and the 5 days intervening between date of mandate and the hearing in question.
[2]  In view of Pruett's sentence of two years' confinement in the Texas Department of Corrections he could have at any time upon making the requisite appeal bond ended his confinement or "term" in the county jail.
[3]  "A writ of prohibition has many of the characteristics of a writ of mandamus, except that the latter commands the performance of an act, whereas the former restrains its performance." 46 Tex.Jur. 2d, Prohibition, Sec. 2, p. 446.
