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

Function init_embedded_server

libmysqld/lib_sql.cc:532–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530char ** copy_arguments_ptr= 0;
531
532int init_embedded_server(int argc, char **argv, char **groups)
533{
534 /*
535 This mess is to allow people to call the init function without
536 having to mess with a fake argv
537 */
538 int *argcp;
539 char ***argvp;
540 char *fake_argv[] = { (char *)"", 0 };
541 const char *fake_groups[] = { "server", "embedded", 0 };
542 my_bool acl_error;
543
544 DBUG_ASSERT(mysql_embedded_init == 0);
545 embedded_print_errors= 1;
546 if (my_thread_init())
547 return 1;
548
549 if (init_early_variables())
550 return 1;
551
552 if (!argc)
553 {
554 argc= 1;
555 argv= fake_argv;
556 }
557 argcp= &argc;
558 argvp= &argv;
559
560 if (!groups)
561 groups= (char**) fake_groups;
562
563 if (!my_progname)
564 my_progname= (char *)"mysql_embedded";
565
566 /*
567 Perform basic logger initialization logger. Should be called after
568 MY_INIT, as it initializes mutexes. Log tables are inited later.
569 */
570 logger.init_base();
571
572 orig_argc= *argcp;
573 orig_argv= *argvp;
574 if (load_defaults("my", (const char **)groups, argcp, argvp))
575 return 1;
576 defaults_argc= *argcp;
577 defaults_argv= *argvp;
578 remaining_argc= *argcp;
579 remaining_argv= *argvp;
580
581 /* Must be initialized early for comparison of options name */
582 system_charset_info= &my_charset_utf8mb3_general_ci;
583 sys_var_init();
584
585 int ho_error= handle_early_options();
586 if (ho_error != 0)
587 return 1;
588
589 my_timer_init(&sys_timer_info);

Callers 1

mysql_server_initFunction · 0.85

Calls 15

my_thread_initFunction · 0.85
init_early_variablesFunction · 0.85
load_defaultsFunction · 0.85
sys_var_initFunction · 0.85
handle_early_optionsFunction · 0.85
my_timer_initFunction · 0.85
init_common_variablesFunction · 0.85
mysql_server_endFunction · 0.85
init_sslFunction · 0.85
acl_initFunction · 0.85
grant_initFunction · 0.85
my_tz_initFunction · 0.85

Tested by

no test coverage detected