From f727fb45d4aa6cb3b483366f7b6ab7bbb2a5923c Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sun, 20 Sep 2015 20:22:22 +0200 Subject: [PATCH] Fix to make os_thread_id it compiled on windows. --- sql/sql_class.cc | 2 +- sql/sql_class.h | 2 +- sql/sql_show.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index cb1aabf79e5..0a0d3ca034e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2073,7 +2073,7 @@ bool THD::store_globals() */ mysys_var->id= thread_id; #ifdef __NR_gettid - os_thread_id= syscall(__NR_gettid); + os_thread_id= (uint32)syscall(__NR_gettid); #else os_thread_id= 0; #endif diff --git a/sql/sql_class.h b/sql/sql_class.h index f12281657f5..58698e91a1d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2630,7 +2630,7 @@ public: ulong query_plan_fsort_passes; pthread_t real_id; /* For debugging */ my_thread_id thread_id; - pid_t os_thread_id; + uint32 os_thread_id; uint tmp_table, global_disable_checkpoint; uint server_status,open_options; enum enum_thread_type system_thread; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 42da649e3d7..f64c30b88f5 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2334,7 +2334,7 @@ public: { TRASH(ptr, size); } ulong thread_id; - ulong os_thread_id; + uint32 os_thread_id; ulonglong start_time; uint command; const char *user,*host,*db,*proc_info,*state_info;