• Marc Alff's avatar
    Bug#56761 Segfault on CHECKSUM TABLE performance_schema.EVENTS_WAITS_HISTORY EXTENDED · 623863fd
    Marc Alff authored
    Before this fix, the server could crash inside a memcpy when reading data
    from the EVENTS_WAITS_CURRENT / HISTORY / HISTORY_LONG  tables.
    
    The root cause is that the length used in a memcpy could be corrupted,
    when another thread writes data in the wait record being read.
    Reading unsafe data is ok, per design choice, and the code does sanitize
    the data in general, but did not sanitize the length given to memcpy.
    
    The fix is to also sanitize the schema name / object name / file name
    length when extracting the data to produce a row.
    623863fd
table_events_waits.h 5.89 KB