diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 601d777d457..a70c221bfe6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2348,7 +2348,7 @@ longlong Item_func_locate::val_int() b->ptr(), b->length(), &match, 1)) return 0; - return (longlong) match.mblen + start0 + 1; + return (longlong) match.mb_len + start0 + 1; } @@ -3138,9 +3138,9 @@ longlong Item_master_pos_wait::val_int() null_value = 1; return 0; } +#ifdef HAVE_REPLICATION longlong pos = (ulong)args[1]->val_int(); longlong timeout = (arg_count==3) ? args[2]->val_int() : 0 ; -#ifdef HAVE_REPLICATION if ((event_count = active_mi->rli.wait_for_pos(thd, log_name, pos, timeout)) == -2) { null_value = 1; @@ -3687,7 +3687,8 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length, bool -Item_func_set_user_var::update_hash(void *ptr, uint length, Item_result type, +Item_func_set_user_var::update_hash(void *ptr, uint length, + Item_result res_type, CHARSET_INFO *cs, Derivation dv, bool unsigned_arg) { @@ -3696,9 +3697,9 @@ Item_func_set_user_var::update_hash(void *ptr, uint length, Item_result type, result type of the variable */ if ((null_value= args[0]->null_value) && null_item) - type= entry->type; // Don't change type of item + res_type= entry->type; // Don't change type of item if (::update_hash(entry, (null_value= args[0]->null_value), - ptr, length, type, cs, dv, unsigned_arg)) + ptr, length, res_type, cs, dv, unsigned_arg)) { current_thd->fatal_error(); // Probably end of memory null_value= 1; @@ -4851,8 +4852,9 @@ longlong Item_func_row_count::val_int() } -Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name) - :Item_func(), context(context_arg), m_name(name), m_sp(NULL), +Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, + sp_name *name_arg) + :Item_func(), context(context_arg), m_name(name_arg), m_sp(NULL), result_field(NULL) { maybe_null= 1; @@ -4862,8 +4864,8 @@ Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name) Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, - sp_name *name, List<Item> &list) - :Item_func(list), context(context_arg), m_name(name), m_sp(NULL), + sp_name *name_arg, List<Item> &list) + :Item_func(list), context(context_arg), m_name(name_arg), m_sp(NULL), result_field(NULL) { maybe_null= 1; |