Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: properly enforce uniqueness of key columns for FK references #43793

Merged
merged 1 commit into from
Jan 14, 2020

Commits on Jan 14, 2020

  1. sql: properly enforce uniqueness of key columns for FK references

    We introduced a bug in 19.2 that would allow, e.g., a unique index on `(a, b,
    c)` to be used as an index that is supposed to enforce uniqueness for a foreign
    key constraint pointing only to `(a, b)`. This PR reintroduces a check that the
    indexed columns match the FK columns exactly.
    
    Release note (bug fix): Fixed a bug introduced in 19.2 that would allow foreign
    keys to use a unique index on the referenced columns that indexed more columns
    than were included in the columns used in the FK constraint, which allows
    potentially violating uniqueness in the referenced columns themselves.
    lucy-zhang committed Jan 14, 2020
    Configuration menu
    Copy the full SHA
    6430e47 View commit details
    Browse the repository at this point in the history