When personal violence is offered by a inmate to an officer, employee or to another inmate, or when an attempt is made to escape, or to do injury to the building, or any material, implements, etc., those officers and employees are authorized to use all necessary means of defense and to secure the person of the offender.
Code 1858, § 5523 (deriv. Acts 1829, ch. 38, § 25); Shan., § 7542; Code 1932, § 12140; T.C.A. (orig. ed.), § 41-706.