add thread[Init/End] function for Mysql leak fix