Skip to content
  • Knut Anders Hatlen's avatar
    ab37fb88
    Bug#30013011: REDUCE DEPENDENCIES ON JSON_DOM.H · ab37fb88
    Knut Anders Hatlen authored
    Post-push fix for a crash in json.json_functions_innodb on Solaris for
    SPARC.
    
    Json_scalar_holder stores a Json_scalar value in a char buffer that is
    large enough to store values of any sub-class of Json_scalar. The char
    buffer is however not aligned, and when one Json_scalar_holder was
    changed from a member variable of the cmp_item_json class to a local
    variable in cmp_item_json::cmp(), the alignment changed in a way that
    caused the json_functions_innodb test to crash on SPARC.
    
    The fix is to change the type of the buffer from char[] to the
    Any_json_scalar union type, which has more information about the
    actual type of data stored, and helps the compiler choose the proper
    alignment.
    
    Change-Id: I8c064c135766fe4f9e34e596ab6bdb77bbcb7c68
    ab37fb88
    Bug#30013011: REDUCE DEPENDENCIES ON JSON_DOM.H
    Knut Anders Hatlen authored
    Post-push fix for a crash in json.json_functions_innodb on Solaris for
    SPARC.
    
    Json_scalar_holder stores a Json_scalar value in a char buffer that is
    large enough to store values of any sub-class of Json_scalar. The char
    buffer is however not aligned, and when one Json_scalar_holder was
    changed from a member variable of the cmp_item_json class to a local
    variable in cmp_item_json::cmp(), the alignment changed in a way that
    caused the json_functions_innodb test to crash on SPARC.
    
    The fix is to change the type of the buffer from char[] to the
    Any_json_scalar union type, which has more information about the
    actual type of data stored, and helps the compiler choose the proper
    alignment.
    
    Change-Id: I8c064c135766fe4f9e34e596ab6bdb77bbcb7c68
Loading