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

Function init_server_components

sql/mysqld.cc:1893–1928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1891#endif /* HAVE_OPENSSL */
1892
1893static int init_server_components()
1894{
1895 DBUG_ENTER("init_server_components");
1896
1897#ifdef HAVE_MY_TIMER
1898 if (my_os_timer_init_ext())
1899 sql_print_error("Failed to initialize timer component (errno %d).", errno);
1900#else
1901 have_statement_timeout= SHOW_OPTION_NO;
1902#endif
1903
1904 randominit(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
1905 setup_fpu();
1906 init_thr_lock();
1907
1908 proc_info_hook= set_thd_stage_info;
1909
1910 /*
1911 Now that the logger is available, redirect character set
1912 errors directly to the logger
1913 (instead of the buffered_logs used at the server startup time).
1914 */
1915 my_charset_error_reporter= charset_error_reporter;
1916
1917 opt_server_id_mask = ~ulong(0);
1918
1919 /* if the errmsg.sys is not loaded, terminate to maintain behaviour */
1920// if (!DEFAULT_ERRMSGS[0][0])
1921// unireg_abort(1);
1922
1923 logger.set_handlers(LOG_FILE,
1924 opt_log ? LOG_FILE:LOG_NONE);
1925
1926 init_update_queries();
1927 DBUG_RETURN(0);
1928}
1929
1930#ifdef __WIN__
1931int win_init(int argc, char **argv)

Callers 1

mysqld_initFunction · 0.85

Calls 7

sql_print_errorFunction · 0.85
randominitFunction · 0.85
setup_fpuFunction · 0.85
init_thr_lockFunction · 0.85
init_update_queriesFunction · 0.85
set_handlersMethod · 0.80
my_os_timer_init_extFunction · 0.50

Tested by

no test coverage detected