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

Method append_str

sql/sql_explain.cc:1762–1771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1760*/
1761
1762const char *String_list::append_str(MEM_ROOT *mem_root, const char *str)
1763{
1764 size_t len= strlen(str);
1765 char *cp;
1766 if (!(cp = (char*)alloc_root(mem_root, len+1)))
1767 return NULL;
1768 memcpy(cp, str, len+1);
1769 push_back(cp, mem_root);
1770 return cp;
1771}
1772
1773
1774static void write_item(Json_writer *writer, Item *item)

Callers 5

setMethod · 0.80
make_used_partitions_strFunction · 0.80
append_possible_keysFunction · 0.80
save_explain_dataMethod · 0.80

Calls 1

alloc_rootFunction · 0.85

Tested by

no test coverage detected