Commit 12bc3c37 authored by unknown's avatar unknown

Fixed the faulty merge

parent a5a9b980
...@@ -3422,6 +3422,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name, ...@@ -3422,6 +3422,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
entry->length=0; entry->length=0;
entry->update_query_id=0; entry->update_query_id=0;
entry->collation.set(NULL, DERIVATION_IMPLICIT); entry->collation.set(NULL, DERIVATION_IMPLICIT);
entry->unsigned_flag= 0;
/* /*
If we are here, we were called from a SET or a query which sets a If we are here, we were called from a SET or a query which sets a
variable. Imagine it is this: variable. Imagine it is this:
...@@ -3565,6 +3566,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length, ...@@ -3565,6 +3566,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length,
((my_decimal*)entry->value)->fix_buffer_pointer(); ((my_decimal*)entry->value)->fix_buffer_pointer();
entry->length= length; entry->length= length;
entry->collation.set(cs, dv); entry->collation.set(cs, dv);
entry->unsigned_flag= unsigned_arg;
} }
entry->type=type; entry->type=type;
return 0; return 0;
...@@ -3797,7 +3799,7 @@ Item_func_set_user_var::update() ...@@ -3797,7 +3799,7 @@ Item_func_set_user_var::update()
case REAL_RESULT: case REAL_RESULT:
{ {
res= update_hash((void*) &save_result.vreal,sizeof(save_result.vreal), res= update_hash((void*) &save_result.vreal,sizeof(save_result.vreal),
REAL_RESULT, &my_charset_bin, DERIVATION_IMPLICIT); REAL_RESULT, &my_charset_bin, DERIVATION_IMPLICIT, 0);
break; break;
} }
case INT_RESULT: case INT_RESULT:
...@@ -3811,12 +3813,12 @@ Item_func_set_user_var::update() ...@@ -3811,12 +3813,12 @@ Item_func_set_user_var::update()
{ {
if (!save_result.vstr) // Null value if (!save_result.vstr) // Null value
res= update_hash((void*) 0, 0, STRING_RESULT, &my_charset_bin, res= update_hash((void*) 0, 0, STRING_RESULT, &my_charset_bin,
DERIVATION_IMPLICIT); DERIVATION_IMPLICIT, 0);
else else
res= update_hash((void*) save_result.vstr->ptr(), res= update_hash((void*) save_result.vstr->ptr(),
save_result.vstr->length(), STRING_RESULT, save_result.vstr->length(), STRING_RESULT,
save_result.vstr->charset(), save_result.vstr->charset(),
DERIVATION_IMPLICIT); DERIVATION_IMPLICIT, 0);
break; break;
} }
case DECIMAL_RESULT: case DECIMAL_RESULT:
......
...@@ -3846,7 +3846,7 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -3846,7 +3846,7 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
a single record and with a single column. Thus, like a single record and with a single column. Thus, like
a column value, it could always have IMPLICIT derivation. a column value, it could always have IMPLICIT derivation.
*/ */
e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT); e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT, 0);
free_root(thd->mem_root,0); free_root(thd->mem_root,0);
rli->inc_event_relay_log_pos(); rli->inc_event_relay_log_pos();
......
...@@ -2016,6 +2016,7 @@ class user_var_entry ...@@ -2016,6 +2016,7 @@ class user_var_entry
ulong length; ulong length;
query_id_t update_query_id, used_query_id; query_id_t update_query_id, used_query_id;
Item_result type; Item_result type;
bool unsigned_flag;
double val_real(my_bool *null_value); double val_real(my_bool *null_value);
longlong val_int(my_bool *null_value); longlong val_int(my_bool *null_value);
......
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