Skip to content

Commit f727fb4

Browse files
committed
Fix to make os_thread_id it compiled on windows.
1 parent d39a2f7 commit f727fb4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sql/sql_class.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ bool THD::store_globals()
20732073
*/
20742074
mysys_var->id= thread_id;
20752075
#ifdef __NR_gettid
2076-
os_thread_id= syscall(__NR_gettid);
2076+
os_thread_id= (uint32)syscall(__NR_gettid);
20772077
#else
20782078
os_thread_id= 0;
20792079
#endif

sql/sql_class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,7 @@ class THD :public Statement,
26302630
ulong query_plan_fsort_passes;
26312631
pthread_t real_id; /* For debugging */
26322632
my_thread_id thread_id;
2633-
pid_t os_thread_id;
2633+
uint32 os_thread_id;
26342634
uint tmp_table, global_disable_checkpoint;
26352635
uint server_status,open_options;
26362636
enum enum_thread_type system_thread;

sql/sql_show.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2334,7 +2334,7 @@ class thread_info :public ilink {
23342334
{ TRASH(ptr, size); }
23352335

23362336
ulong thread_id;
2337-
ulong os_thread_id;
2337+
uint32 os_thread_id;
23382338
ulonglong start_time;
23392339
uint command;
23402340
const char *user,*host,*db,*proc_info,*state_info;

0 commit comments

Comments
 (0)