diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-03-12 14:46:00 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-06-25 19:01:41 +0200 |
commit | 31e52b163206c9dc9f4c3542d07e0b64b33dade5 (patch) | |
tree | c48f6258b885cc52590911eda031c35c78ced57d /sql/set_var.cc | |
parent | 517d7182013b212db4680a22da2c91314c41f51b (diff) | |
download | mariadb-git-31e52b163206c9dc9f4c3542d07e0b64b33dade5.tar.gz |
Optimize charset tracking a bit.bb-10.2-MDEV-15477
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 77036fd0f5a..a17e7b0aa58 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1016,24 +1016,12 @@ int set_var_collation_client::update(THD *thd) #ifndef EMBEDDED_LIBRARY if (thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->is_enabled()) { - sys_var *svar; - mysql_mutex_lock(&LOCK_plugin); - if ((svar= find_sys_var_ex(thd, "character_set_client", - sizeof("character_set_client") - 1, - false, true))) - thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> - mark_as_changed(thd, (LEX_CSTRING*)svar); - if ((svar= find_sys_var_ex(thd, "character_set_results", - sizeof("character_set_results") - 1, - false, true))) - thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> - mark_as_changed(thd, (LEX_CSTRING*)svar); - if ((svar= find_sys_var_ex(thd, "character_set_connection", - sizeof("character_set_connection") - 1, - false, true))) - thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> - mark_as_changed(thd, (LEX_CSTRING*)svar); - mysql_mutex_unlock(&LOCK_plugin); + thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> + mark_as_changed(thd, (LEX_CSTRING*)Sys_character_set_client_ptr); + thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> + mark_as_changed(thd, (LEX_CSTRING*)Sys_character_set_results_ptr); + thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)-> + mark_as_changed(thd, (LEX_CSTRING*)Sys_character_set_connection_ptr); } thd->session_tracker.mark_as_changed(thd, SESSION_STATE_CHANGE_TRACKER, NULL); #endif //EMBEDDED_LIBRARY |