• Sergei Golubchik's avatar
    MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error · ef5adf52
    Sergei Golubchik authored
    partially revert 76063c2a. Item::clone() is not an all-purpose
    Item copying machine, it was specifically created for pushdown
    of predicates into derived tables and views and it does not
    copy everything. In particular, it does not copy Item_func_regex.
    
    Fix the bug differently by preserving the old constraint name.
    But keep setting automatic_name=true to have it regenerated
    for cases like ALTER TABLE ... ADD CONSTRAINT.
    ef5adf52
check_constraint.test 5.25 KB