diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-06-08 19:05:24 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-06-08 19:05:24 -0300 |
commit | 01912b20bc5e1d9bc3ec80289b0de71f9797eaa9 (patch) | |
tree | 97b468751d966e832b7bffe2727bb965d99961d5 /sql/sql_class.cc | |
parent | a7c2707740054204e52f4665c4d81159272d40b7 (diff) | |
download | mariadb-git-01912b20bc5e1d9bc3ec80289b0de71f9797eaa9.tar.gz |
Fix for a valgrind warning due to use of a uninitialized
variable. The problem was that THD::connect_utime could be
used without being initialized when the main thread is used
to handle connections (--thread-handling=no-threads).
sql/mysqld.cc:
Set THD::start_utime even in no-threads handling mode.
sql/sql_class.cc:
Initialize variable.
sql/sql_class.h:
Rename connect_utime to prior_thr_create_utime as to
better reflect it's use intention.
sql/sql_connect.cc:
Check only if a thread was actually created.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index f881f0a792b..f1ad410b877 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -590,7 +590,7 @@ THD::THD() // Must be reset to handle error with THD's created for init of mysqld lex->current_select= 0; start_time=(time_t) 0; - start_utime= 0L; + start_utime= prior_thr_create_utime= 0L; utime_after_lock= 0L; current_linfo = 0; slave_thread = 0; |