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

Function fix_dl_name

sql/sql_plugin.cc:376–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376static void fix_dl_name(MEM_ROOT *root, LEX_CSTRING *dl)
377{
378 const Lex_ident_plugin so_ext(STRING_WITH_LEN(SO_EXT));
379 if (dl->length < so_ext.length ||
380 !so_ext.streq(Lex_cstring(dl->str + dl->length - so_ext.length,
381 so_ext.length)))
382 {
383 size_t s_size= dl->length + so_ext.length + 1;
384 char *s= (char*)alloc_root(root, s_size);
385 memcpy(s, dl->str, dl->length);
386 safe_strcpy(s + dl->length, s_size - dl->length, SO_EXT);
387 dl->str= s;
388 dl->length+= so_ext.length;
389 }
390}
391
392
393/****************************************************************************

Callers 2

plugin_addFunction · 0.85
mysql_uninstall_pluginFunction · 0.85

Calls 4

Lex_cstringClass · 0.85
alloc_rootFunction · 0.85
safe_strcpyFunction · 0.85
streqMethod · 0.45

Tested by

no test coverage detected