Skip to content
  • Marc Alff's avatar
    4d2f44c0
    Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE · 4d2f44c0
    Marc Alff authored
    CHARSET PROPERLY
    
    Fix for 5.7, backport of:
      commit 13f323af9b0cd4a9a214414fce476117935dc659
      Author: Marc Alff <marc.alff@oracle.com>
      Date:   Wed Oct 12 18:50:47 2016 +0200
    
          Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE
          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.
    4d2f44c0
    Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE
    Marc Alff authored
    CHARSET PROPERLY
    
    Fix for 5.7, backport of:
      commit 13f323af9b0cd4a9a214414fce476117935dc659
      Author: Marc Alff <marc.alff@oracle.com>
      Date:   Wed Oct 12 18:50:47 2016 +0200
    
          Bug#22313205 PERFORMANCE_SCHEMA STATUS AND VARIABLES TABLES DO NOT HANDLE
          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