Skip to content
  • Marc Alff's avatar
    02b00b15
    Bug#21528683 SLOWDOWN CAUSED BY MEMSET IN SQL_DIGEST_STORAGE.RESET() · 02b00b15
    Marc Alff authored
    Before this fix, an unnecessary memset was called in
    sql_digest_storage.memset().
    
    This affected:
    - the server under normal operations,
      when collecting digests for a query,
      with typically an extra memset(1024) for each query.
    
    - the performance_schema.events_statements_current,
      _history and _history_long tables, during a SELECT,
      with typically an extra memset(1024*1024) for each row.
    
    This memset is un necessary, because the code making
    copies of struct sql_digest_storage, or computing md5 of it,
    is already only using the first m_byte_counts initialized bytes
    and not the full array.
    
    The fix is to simply remove the memset().
    02b00b15
    Bug#21528683 SLOWDOWN CAUSED BY MEMSET IN SQL_DIGEST_STORAGE.RESET()
    Marc Alff authored
    Before this fix, an unnecessary memset was called in
    sql_digest_storage.memset().
    
    This affected:
    - the server under normal operations,
      when collecting digests for a query,
      with typically an extra memset(1024) for each query.
    
    - the performance_schema.events_statements_current,
      _history and _history_long tables, during a SELECT,
      with typically an extra memset(1024*1024) for each row.
    
    This memset is un necessary, because the code making
    copies of struct sql_digest_storage, or computing md5 of it,
    is already only using the first m_byte_counts initialized bytes
    and not the full array.
    
    The fix is to simply remove the memset().
Loading