MDEV-16264 prerequisite patch, enable thr_timer in embedded

Since threadpool is using thr_timer, and it also exist in embedded version,
initialize timer also in embedded version
This commit is contained in:
Vladislav Vaintroub 2019-10-29 18:37:14 +01:00
parent ad17c98dd5
commit 2fb23b896e

View file

@ -1995,9 +1995,7 @@ static void clean_up(bool print_message)
sp_cache_end(); sp_cache_end();
free_status_vars(); free_status_vars();
end_thr_alarm(1); /* Free allocated memory */ end_thr_alarm(1); /* Free allocated memory */
#ifndef EMBEDDED_LIBRARY
end_thr_timer(); end_thr_timer();
#endif
my_free_open_file_info(); my_free_open_file_info();
if (defaults_argv) if (defaults_argv)
free_defaults(defaults_argv); free_defaults(defaults_argv);
@ -4737,13 +4735,11 @@ static int init_server_components()
init_thr_lock(); init_thr_lock();
backup_init(); backup_init();
#ifndef EMBEDDED_LIBRARY
if (init_thr_timer(thread_scheduler->max_threads + extra_max_connections)) if (init_thr_timer(thread_scheduler->max_threads + extra_max_connections))
{ {
fprintf(stderr, "Can't initialize timers\n"); fprintf(stderr, "Can't initialize timers\n");
unireg_abort(1); unireg_abort(1);
} }
#endif
my_uuid_init((ulong) (my_rnd(&sql_rand))*12345,12345); my_uuid_init((ulong) (my_rnd(&sql_rand))*12345,12345);
wt_init(); wt_init();