mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user