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

Function handle_default_option

mysys_ssl/my_default.cc:456–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454*/
455
456static int handle_default_option(void *in_ctx, const char *group_name,
457 const char *option)
458{
459 char *tmp;
460 struct handle_option_ctx *ctx= (struct handle_option_ctx *) in_ctx;
461
462 if (!option)
463 return 0;
464
465 if (find_type((char *)group_name, ctx->group, FIND_TYPE_NO_PREFIX))
466 {
467 if (!(tmp= (char *) alloc_root(ctx->alloc, strlen(option) + 1)))
468 return 1;
469 if (insert_dynamic(ctx->args, &tmp))
470 return 1;
471 strmov(tmp, option);
472 }
473
474 return 0;
475}
476
477
478/*

Callers

nothing calls this directly

Calls 4

alloc_rootFunction · 0.85
insert_dynamicFunction · 0.85
strmovFunction · 0.85
find_typeFunction · 0.50

Tested by

no test coverage detected