maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #00117
[patch 08/11] Fix Valgrind warning of uninitialized data.
After implementing pool_of_threads, the thd->connect_utime and
thd->start_utime are not always correctly initialized (depending on
which thread model is used).
=== modified file 'sql/mysqld.cc'
---
sql/mysqld.cc | 1 +
sql/scheduler.cc | 1 +
2 files changed, 2 insertions(+)
Index: sql/mysqld.cc
===================================================================
--- sql/mysqld.cc.orig 2009-04-07 13:42:09.000000000 +0200
+++ sql/mysqld.cc 2009-04-07 13:42:18.000000000 +0200
@@ -4839,6 +4839,7 @@ void handle_connection_in_main_thread(TH
safe_mutex_assert_owner(&LOCK_thread_count);
thread_cache_size=0; // Safety
threads.append(thd);
+ thd->connect_utime= thd->start_utime= my_micro_time();
(void) pthread_mutex_unlock(&LOCK_thread_count);
handle_one_connection((void*) thd);
}
Index: sql/scheduler.cc
===================================================================
--- sql/scheduler.cc.orig 2009-04-07 13:40:35.000000000 +0200
+++ sql/scheduler.cc 2009-04-07 13:42:18.000000000 +0200
@@ -470,6 +470,7 @@ static void libevent_add_connection(THD
DBUG_VOID_RETURN;
}
threads.append(thd);
+ thd->connect_utime= thd->start_utime= my_micro_time();
libevent_thd_add(thd);
pthread_mutex_unlock(&LOCK_thread_count);
--
Follow ups
References