| 3645 | } |
| 3646 | |
| 3647 | bool sys_var_pluginvar::session_update(THD *thd, set_var *var) |
| 3648 | { |
| 3649 | DBUG_ASSERT(!is_readonly()); |
| 3650 | DBUG_ASSERT(plugin_var->flags & PLUGIN_VAR_THDLOCAL); |
| 3651 | DBUG_ASSERT(thd == current_thd); |
| 3652 | |
| 3653 | mysql_mutex_lock(&LOCK_global_system_variables); |
| 3654 | void *tgt= real_value_ptr(thd, OPT_SESSION); |
| 3655 | const void *src= var->value ? (void*)&var->save_result |
| 3656 | : (void*)real_value_ptr(thd, OPT_GLOBAL); |
| 3657 | mysql_mutex_unlock(&LOCK_global_system_variables); |
| 3658 | |
| 3659 | plugin_var->update(thd, plugin_var, tgt, src); |
| 3660 | |
| 3661 | return false; |
| 3662 | } |
| 3663 | |
| 3664 | static const void *var_def_ptr(st_mysql_sys_var *pv) |
| 3665 | { |