You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG#19770958: WRONG RESULTS WITH STORED PROGRAMS AND NULLABLE SYSTEM
VARIABLES
null_value was not being reset between invocations of
Item_func_get_system_var::val_str().
When a stored procedure evaluates a system variable it calls
sp_eval_expr() which in turn calls
Item::save_in_field(). Item::save_in_field() calls
Item_func_get_system_var::val_str() but ignores the returned value if
null_value is true. As a result it continued to return NULL even if
the value of the system variable had been updated.
Normal execution was not affected because Item::send() does not call
Item::save_in_field(), but calls val_str() directly and ignores the
null_value variable.
Patch modifies Item_func_get_system_var::val_str() so that null_value
is reset to FALSE before checking if the variable value is NULL.
0 commit comments