Implemented possibility to set MySQL wait_timeout using mysql_wait configuration variable.