diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-25 17:41:05 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-25 17:41:05 +0200 |
commit | b828da994f7f376be0ce298527952efef17117d1 (patch) | |
tree | 4d543163402accc25309648be2359a539365eaaa /sql/sql_class.cc | |
parent | 384353cc71d105b258774b30292dd077e9817af9 (diff) | |
download | mariadb-git-b828da994f7f376be0ce298527952efef17117d1.tar.gz |
Bug #34002 uninitialized Rows_examined for some admin queries
such as quit and shutdown
Logging to slow log can produce an undetermined value for
Rows_examined in special cases. In debug mode this manifests
itself as any of the various marker values used to mark
uninitialized memory on various platforms.
If logging happens on a THD object that hasn't performed any
row reads (on this or any previous connections), the
THD::examined_row_count may be uninitialized. This patch adds
initialization for this attribute.
No automated test cases are added, as for this to be
meaningful, we need to ensure that we're using a THD
fulfilling the above conditions. This is hard to do in the
mysql-test-run framework. The patch has been verified
manually, however, by restarting mysqld and running the test
included with the bug report.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index f1ad410b877..409e4dc4b8b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -546,6 +546,7 @@ THD::THD() first_successful_insert_id_in_prev_stmt_for_binlog(0), first_successful_insert_id_in_cur_stmt(0), stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE), + examined_row_count(0), global_read_lock(0), is_fatal_error(0), transaction_rollback_request(0), |