Commit cb8a39e7 authored by Gleb Shchepa's avatar Gleb Shchepa

Post-push fix for bug #26020: User-Defined Variables are not consistence with columns data types.

--ps-protocol problem has been fixed.
parent db1d38c9
...@@ -3809,7 +3809,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name, ...@@ -3809,7 +3809,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
bool Item_func_set_user_var::set_entry(THD *thd, bool create_if_not_exists) bool Item_func_set_user_var::set_entry(THD *thd, bool create_if_not_exists)
{ {
if (thd == entry_thd && entry) if (thd == entry_thd && entry)
return FALSE; goto end; // update entry->update_query_id for PS
entry_thd= thd; entry_thd= thd;
if (!(entry= get_variable(&thd->user_vars, name, create_if_not_exists))) if (!(entry= get_variable(&thd->user_vars, name, create_if_not_exists)))
return TRUE; return TRUE;
...@@ -3818,6 +3818,7 @@ bool Item_func_set_user_var::set_entry(THD *thd, bool create_if_not_exists) ...@@ -3818,6 +3818,7 @@ bool Item_func_set_user_var::set_entry(THD *thd, bool create_if_not_exists)
if this variable is a constant item in the query (it is if update_query_id if this variable is a constant item in the query (it is if update_query_id
is different from query_id). is different from query_id).
*/ */
end:
entry->update_query_id= thd->query_id; entry->update_query_id= thd->query_id;
return FALSE; return FALSE;
} }
......
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