• Sreeharsha Ramanavarapu's avatar
    Bug #26881946: INCORRECT BEHAVIOR WITH "VALUES" · f06443ce
    Sreeharsha Ramanavarapu authored
    Issue:
    ------
    VALUES doesn't have a type() function and is considered a
    Item_field.
    
    Solution for 5.7:
    -----------------
    Add a new type() function for Item_values_insert.
    
    On 8.0 and trunk it was fixed by Mithun's Bug#19601973.
    
    Solution for 5.6:
    -----------------
    Additionally Bug#17458914 is backported.
    
    This will address the problem of using VALUES() in
    INSERT ... ON DUPLICATE KEY UPDATE. Create a field object
    only if it is in the UPDATE clause, else return a NULL
    item.
    
    This will also address the problems mentioned in
    Bug#14789787 and Bug#16756402.
    
    Solution for 5.5:
    -----------------
    As mentioned above Bug#17458914 is backported.
    
    Additionally Bug#14786324 is also backported.
    
    When VALUES() is detected outside its meaningful place,
    it should be treated as NULL and is thus replaced with a
    Field_null object, with the same name as the original
    field.
    
    Fields with type NULL are generally not handled well inside
    the server (e.g Innodb will not accept them and it is
    impossible to create them in regular tables). So create a
    new const NULL item instead.
    f06443ce
item.h 116 KB