• Sreeharsha Ramanavarapu's avatar
    Bug #18823979: PS: UCS2 + CASE WHEN THEN ELSE CRASH IN · 718c7879
    Sreeharsha Ramanavarapu authored
                   ITEM_PARAM::SAFE_CHARSET_CONVERTER
    
    ISSUE:
    ------
    Charset conversion on a null parameter is not handled
    correctly.
    
    SOLUTION:
    ---------
    Item_param's charset converter does not handle the case
    where it might have to deal with a null value. This is
    fine for other charset converters since the value is not
    supplied to them at runtime.
    
    The fix is to check if the parameter is now set to null and
    return an Item_null object. Also, there is no need to
    initialize Item_param's cnvitem in the constructor to a
    string. This can be done in
    ITEM_PARAM::SAFE_CHARSET_CONVERTER itself.
    
    Members of Item_param, cnvbuf and cnvstr, have been removed
    and cnvitem has been made a local variable in
    ITEM_PARAM::SAFE_CHARSET_CONVERTER.
    718c7879
item.cc 233 KB