• Staale Smedseng's avatar
    Bug #34002 uninitialized Rows_examined for some admin queries · b828da99
    Staale Smedseng authored
    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.
    b828da99
sql_class.cc 103 KB