dolthub / dolthub/dolt

Some cases need resolving ForeignKeyConstraints when ForeignKeyCheck is off

Open
#2,837 0 comments 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

When FK check is off, we currently ignore all FK constraints for any statements. According to [MySql documentations on FK check](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_foreign_key_checks), there are couple cases that needs FK constraints check:
- re-creating a dropped table
- `ALTER TABLE` operation

The example to reproduce the bug is [here](https://github.com/dolthub/dolt/issues/2764#issuecomment-1033057211)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.