diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-01 09:01:15 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-01 09:01:15 +0000 |
commit | 313247db9c0bb884d4fa000035da4a0fd22d567b (patch) | |
tree | 7362aaa5670fa87c06cc9418a5b640795920013b /sql/mysqld.h | |
parent | b56f9fbe2f6a83f2fd2964c56de9097877354783 (diff) | |
download | mariadb-git-313247db9c0bb884d4fa000035da4a0fd22d567b.tar.gz |
MDEV-15089 Ensure that connection ID is in 32bit range
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r-- | sql/mysqld.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h index 310bc1dd342..d13fdd193ef 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -722,15 +722,7 @@ inline query_id_t get_query_id() } /* increment global_thread_id and return it. */ -inline __attribute__((warn_unused_result)) my_thread_id next_thread_id() -{ - return my_atomic_add64_explicit((int64*) &global_thread_id, 1, MY_MEMORY_ORDER_RELAXED); -} - -#if defined(MYSQL_DYNAMIC_PLUGIN) && defined(_WIN32) -extern "C" my_thread_id next_thread_id_noinline(); -#define next_thread_id() next_thread_id_noinline() -#endif +extern __attribute__((warn_unused_result)) my_thread_id next_thread_id(void); /* TODO: Replace this with an inline function. |