summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-06-12 11:10:55 +0300
committerAleksey Midenkov <midenok@gmail.com>2020-06-12 11:12:40 +0300
commit762bf7a03b6214f091a66ca8683df341112d7d4a (patch)
treeeb86fdd1eda7b8d04dd51cde33a44c629f651528 /sql/rpl_rli.h
parent02c255d1e017072858ef812b8c5c5f4e217fb6c4 (diff)
downloadmariadb-git-762bf7a03b6214f091a66ca8683df341112d7d4a.tar.gz
MDEV-22602 Disable UPDATE CASCADE for SQL constraints
CHECK constraint is checked by check_expression() which walks its items and gets into Item_field::check_vcol_func_processor() to check for conformity with foreign key list. WITHOUT OVERLAPS is checked for same conformity in mysql_prepare_create_table(). Long uniques are already impossible with InnoDB foreign keys. See ER_CANT_CREATE_TABLE in test case. 2 accompanying bugs fixed (test main.constraints failed): 1. check->name.str lived on SP execute mem_root while "check" obj itself lives on SP main mem_root. On second SP execute check->name.str had garbage data. Fixed by allocating from thd->stmt_arena->mem_root which is SP main mem_root. 2. CHECK_CONSTRAINT_IF_NOT_EXISTS value was mixed with VCOL_FIELD_REF. VCOL_FIELD_REF is assigned in check_expression() and then detected as CHECK_CONSTRAINT_IF_NOT_EXISTS in handle_if_exists_options(). Existing cases for MDEV-16932 in main.constraints cover both fixes.
Diffstat (limited to 'sql/rpl_rli.h')
0 files changed, 0 insertions, 0 deletions