maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #10218
Re: Please review MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
Hi, Alexander!
On Dec 19, Alexander Barkov wrote:
> Hello Sergei,
>
> Please review a patch for MDEV-10386.
>
> Thanks!
> diff --git a/sql/item.cc b/sql/item.cc
> index 53666aa..44bd620 100644
> --- a/sql/item.cc
> +++ b/sql/item.cc
> @@ -1164,7 +1164,9 @@ Item *Item_cache::safe_charset_converter(CHARSET_INFO *tocs)
> if (conv == example)
> return this;
> Item_cache *cache;
> - if (!conv || !(cache= new Item_cache_str(conv)))
> + if (!conv ||
> + conv->fix_fields(current_thd, (Item **) NULL) ||
> + !(cache= new Item_cache_str(conv)))
> return NULL; // Safe conversion is not possible, or OEM
> cache->setup(conv);
> cache->fixed= false; // Make Item::fix_fields() happy
Difficult to review without a commit comment.
What's going on here? How did it work before without fix_fields?
Why is it suddenly needed?
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
Follow ups
References