| 869 | */ |
| 870 | |
| 871 | void THD::init(void) |
| 872 | { |
| 873 | plugin_thdvar_init(this, m_enable_plugins); |
| 874 | /* |
| 875 | variables= global_system_variables above has reset |
| 876 | variables.pseudo_thread_id to 0. We need to correct it here to |
| 877 | avoid temporary tables replication failure. |
| 878 | */ |
| 879 | variables.pseudo_thread_id= thread_id; |
| 880 | server_status= SERVER_STATUS_AUTOCOMMIT; |
| 881 | if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) |
| 882 | server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES; |
| 883 | |
| 884 | update_lock_default= (variables.low_priority_updates ? |
| 885 | TL_WRITE_LOW_PRIORITY : |
| 886 | TL_WRITE); |
| 887 | tx_isolation= (enum_tx_isolation) variables.tx_isolation; |
| 888 | tx_read_only= variables.tx_read_only; |
| 889 | update_charset(); |
| 890 | |
| 891 | reset_stats(); |
| 892 | |
| 893 | clear_slow_extended(); |
| 894 | } |
| 895 | |
| 896 | // Resets stats in a THD. |
| 897 | void THD::reset_stats(void) |
no test coverage detected