Skip to content
  • Marc Alff's avatar
    8b3b6d33
    Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE · 8b3b6d33
    Marc Alff authored
    CHARSET PROPERLY
    
    Tables like performance_schema.session_variables can print string values.
    
    Before this fix, string values expressed in a character set different
    than UTf8 would be truncated or incorrect.
    
    This affects for example system variables expressed using
    the file system character set, like character_sets_dir.
    
    With the following options:
    --character-set-filesystem=latin1
    --character-sets-dir=<value in latin1 here>
    the value for character-sets-dir is printed incorrectly,
    because the latin1 value is printed as UTF8.
    
    The root cause is that string values for system variables are
    represented as a binary buffer internally, but the associated
    CHARSET_INFO is lost, later assumed to be UTF8.
    
    The fix is to preserve (CHARSET_INFO, string value, string value length)
    together when representing a system variable in the performance schema,
    and use the proper character set when populating the performance_schema
    table.
    8b3b6d33
    Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE
    Marc Alff authored
    CHARSET PROPERLY
    
    Tables like performance_schema.session_variables can print string values.
    
    Before this fix, string values expressed in a character set different
    than UTf8 would be truncated or incorrect.
    
    This affects for example system variables expressed using
    the file system character set, like character_sets_dir.
    
    With the following options:
    --character-set-filesystem=latin1
    --character-sets-dir=<value in latin1 here>
    the value for character-sets-dir is printed incorrectly,
    because the latin1 value is printed as UTF8.
    
    The root cause is that string values for system variables are
    represented as a binary buffer internally, but the associated
    CHARSET_INFO is lost, later assumed to be UTF8.
    
    The fix is to preserve (CHARSET_INFO, string value, string value length)
    together when representing a system variable in the performance schema,
    and use the proper character set when populating the performance_schema
    table.
Loading