When the offense described in an arrest warrant is a misdemeanor and it is executed by the sheriff or his deputy, such sheriff or deputy may, on the request of the defendant, discharge him on sufficient bail for his appearance at the next term of the court having jurisdiction of the offense to answer any indictment which may be found against him therefor; and, if such court is in session, for his appearance at such court.