MCPcopy Create free account
hub / github.com/MariaDB/server / copy_string

Function copy_string

sql/sql_error.cc:176–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176static void copy_string(MEM_ROOT *mem_root, String* dst, const String* src)
177{
178 size_t len= src->length();
179 if (len)
180 {
181 char* copy= (char*) alloc_root(mem_root, len + 1);
182 if (copy)
183 {
184 memcpy(copy, src->ptr(), len);
185 copy[len]= '\0';
186 dst->set(copy, len, src->charset());
187 }
188 }
189 else
190 dst->length(0);
191}
192
193void
194Sql_condition::copy_opt_attributes(const Sql_condition *cond)

Callers 1

copy_opt_attributesMethod · 0.85

Calls 5

alloc_rootFunction · 0.85
lengthMethod · 0.45
ptrMethod · 0.45
setMethod · 0.45
charsetMethod · 0.45

Tested by

no test coverage detected