| 1891 | #endif /* HAVE_OPENSSL */ |
| 1892 | |
| 1893 | static 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__ |
| 1931 | int win_init(int argc, char **argv) |
no test coverage detected