Commit 0165ca88 authored by Sergey Petrunia's avatar Sergey Petrunia

@@optimizer_switch switch from no_xxx to xxx={on|off} syntax:

- Fix valgrind warning on attempt to run a "SET optimizer_switch=number" statement.
  Need to call c_ptr_safe() as strings returned by non-string items are not 
  necessarily null-terminated.
parent 3f0a54e3
......@@ -3990,7 +3990,7 @@ bool sys_var_thd_optimizer_switch::check(THD *thd, set_var *var)
optimizer_switch_typelib.count,
thd->variables.optimizer_switch,
global_system_variables.optimizer_switch,
res->c_ptr(), res->length(), NULL,
res->c_ptr_safe(), res->length(), NULL,
&error, &error_len, &not_used);
if (error_len)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment