1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00

MDEV-19566 Remove Item::name related strlen() calls in constructors of some Item_string descendands

This commit is contained in:
Alexander Barkov
2019-05-23 14:57:29 +04:00
parent 826f9d4f7e
commit c83018751c
14 changed files with 110 additions and 112 deletions

View File

@@ -6888,10 +6888,10 @@ Item *Type_handler_string_result::
String *result= item->val_str(&tmp);
if (item->null_value)
return new (thd->mem_root) Item_null(thd, item->name.str);
uint length= result->length();
char *tmp_str= thd->strmake(result->ptr(), length);
return new (thd->mem_root) Item_string(thd, item->name.str,
tmp_str, length, result->charset());
LEX_CSTRING value;
thd->make_lex_string(&value, result->ptr(), result->length());
return new (thd->mem_root) Item_string(thd, item->name, value,
result->charset());
}