Properly lock LOCK_thd_data when changing thd->query().
Properly lock LOCK_thd_data when changing thd->query().

Without the proper locking any thread executing SHOW PROCESSLIST may show
garbage when trying to read queries each thread is executing.

Change-Id: Ie676cc2d9deaf3f9f51a5fca1c61ae34d658b961

laizi77/google-mysql,odolhado/google-mysql,raumfish/google-mysql,fengshao0907/google-mysql,cong8341/google-mysql,google/mysql,raumfish/google-mysql,odolhado/google-mysql,raumfish/google-mysql,fengshao0907/google-mysql,fengshao0907/google-mysql,cong8341/google-mysql,google/mysql,laizi77/google-mysql,fengshao0907/google-mysql,fengshao0907/google-mysql,cong8341/google-mysql,cong8341/google-mysql,raumfish/google-mysql,cong8341/google-mysql,laizi77/google-mysql,google/mysql,laizi77/google-mysql,laizi77/google-mysql,odolhado/google-mysql,raumfish/google-mysql,laizi77/google-mysql,fengshao0907/google-mysql,odolhado/google-mysql,odolhado/google-mysql,google/mysql,raumfish/google-mysql,cong8341/google-mysql,google/mysql,laizi77/google-mysql,odolhado/google-mysql,odolhado/google-mysql,raumfish/google-mysql,cong8341/google-mysql,google/mysql,laizi77/google-mysql,raumfish/google-mysql,cong8341/google-mysql,fengshao0907/google-mysql,odolhado/google-mysql,fengshao0907/google-mysql,google/mysql,google/mysql