| 1152 | |
| 1153 | |
| 1154 | LEX_STRING * |
| 1155 | make_lex_string_root(MEM_ROOT *mem_root, |
| 1156 | LEX_STRING *lex_str, const char* str, uint length, |
| 1157 | bool allocate_lex_string) |
| 1158 | { |
| 1159 | if (allocate_lex_string) |
| 1160 | if (!(lex_str= (LEX_STRING *)alloc_root(mem_root, sizeof(LEX_STRING)))) |
| 1161 | return 0; |
| 1162 | if (!(lex_str->str= strmake_root(mem_root, str, length))) |
| 1163 | return 0; |
| 1164 | lex_str->length= length; |
| 1165 | return lex_str; |
| 1166 | } |
| 1167 | |
| 1168 | /** |
| 1169 | Create a LEX_STRING in this connection. |
no test coverage detected