• holyfoot/hf@mysql.com/deer.(none)'s avatar
    bug #16813 (WITH CHECK OPTION fails with UPDATE) · 3474fc9a
    holyfoot/hf@mysql.com/deer.(none) authored
    We use the condition from CHECK OPTION twice handling UPDATE command.
    First we construnct 'update_cond' AND 'option_cond'
    condition to select records to be updated, then we check the
    'option_cond' for the updated row.
    The problem is that first 'AND' condition is optimized during the 'select'
    which can break 'option_cond' structure, so it will be unusable for
    the sectond use - to check the updated row.
    Possible soultion is either use copy of the condition in the first
    use or to make optimization less traumatic for the operands.
    I picked the first one. 
    3474fc9a
view.test 73.2 KB