• Staale Smedseng's avatar
    Bug #49756 Rows_examined is always 0 in the slow query log for · 330864fc
    Staale Smedseng authored
    update statements
          
    Only SELECT statements report any examined rows in the slow
    log. Slow UPDATE, DELETE and INSERT statements report 0 rows
    examined, unless the statement has a condition including a
    SELECT substatement.
          
    This patch adds counting of examined rows for the UPDATE and
    DELETE statements. An INSERT ... VALUES statement will still 
    not report any rows as examined.
    
    
    
    sql/sql_class.h:
      Added more docs for THD::examined_row_count.
    sql/sql_delete.cc:
      Add incrementing thd->examined_row_count.
    sql/sql_update.cc:
      Add incrementing thd->examined_row_count.
    330864fc
log_state.test 13.1 KB