Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
MySQL Silently Ignores Foreign Keys (mysql.com)
1 point by ttfkam on Jan 24, 2024 | hide | past | favorite | 1 comment


When porting your database schema from other engines, it is common to have REFERENCES clauses inline with the column. MySQL parses the syntax but does not actually create the foreign key constraints. Worse still, it does so silently, without a prominent warning on the console.

This behavior is similar to CHECK constraints in years past where MySQL would parse them but had no actual support for the feature until very recently.

The days of MySQL gotchas is apparently far from over.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: