MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / set_str_with_copy

Method set_str_with_copy

sql/item.h:2136–2140  ·  view source on GitHub ↗

This is used in stored procedures to avoid memory leaks and does a deep copy of its argument. */

Source from the content-addressed store, hash-verified

2134 does a deep copy of its argument.
2135 */
2136 void set_str_with_copy(const char *str_arg, uint length_arg)
2137 {
2138 str_value.copy(str_arg, length_arg, collation.collation);
2139 max_length= str_value.numchars() * collation.collation->mbmaxlen;
2140 }
2141 void set_repertoire_from_value()
2142 {
2143 collation.repertoire= my_string_repertoire(str_value.charset(),

Callers

nothing calls this directly

Calls 2

numcharsMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected