Section 122(2) in The Code of Criminal Procedure, 1973
(2)When such person has been ordered by a Magistrate to give security for a period exceeding one year, such Magistrate shall, if such person does not give such security as aforesaid, issue a warrant directing him to be detained in prison pending the orders of the Session Judge and the proceedings shall be laid, as soon as conveniently may be, before such Court.