mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fix application verifier crashes
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#pragma comment(lib, "ws2_32")
|
||||
#endif
|
||||
my_bool have_tcpip=0;
|
||||
extern pthread_key(struct st_my_thread_var*, THR_KEY_mysys);
|
||||
static void my_win_init(void);
|
||||
static my_bool win32_init_tcp_ip();
|
||||
#else
|
||||
@ -222,6 +223,8 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
|
||||
WSACleanup();
|
||||
#endif /* __WIN__ */
|
||||
|
||||
/* At very last, delete mysys key, it is used everywhere including DBUG */
|
||||
pthread_key_delete(THR_KEY_mysys);
|
||||
my_init_done=0;
|
||||
} /* my_end */
|
||||
|
||||
|
@ -274,7 +274,6 @@ void my_thread_global_end(void)
|
||||
*/
|
||||
if (all_threads_killed)
|
||||
{
|
||||
pthread_key_delete(THR_KEY_mysys);
|
||||
my_thread_destroy_internal_mutex();
|
||||
}
|
||||
my_thread_global_init_done= 0;
|
||||
|
@ -423,6 +423,8 @@ static void wt_resource_destroy(uchar *arg)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
static int wt_init_done;
|
||||
|
||||
void wt_init()
|
||||
{
|
||||
DBUG_ENTER("wt_init");
|
||||
@ -456,18 +458,22 @@ void wt_init()
|
||||
my_atomic_rwlock_init(&cycle_stats_lock);
|
||||
my_atomic_rwlock_init(&success_stats_lock);
|
||||
my_atomic_rwlock_init(&wait_stats_lock);
|
||||
wt_init_done= 1;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
void wt_end()
|
||||
{
|
||||
DBUG_ENTER("wt_end");
|
||||
if (!wt_init_done)
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
DBUG_ASSERT(reshash.count == 0);
|
||||
lf_hash_destroy(&reshash);
|
||||
my_atomic_rwlock_destroy(&cycle_stats_lock);
|
||||
my_atomic_rwlock_destroy(&success_stats_lock);
|
||||
my_atomic_rwlock_destroy(&wait_stats_lock);
|
||||
wt_init_done= 0;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user