- 最新
- 最多得票
- 最多評論
Hi mpbarlow,
I understand from you are getting an intermittent error related to missing tables when running queries especially in times of high load. Please correct me if I misunderstood.
As you may know that MySQL(before 8.0) uses two Data Dictionaries (MySQL's own dictionary and InnoDB's dictionary), this issue might be due to both MySQL and InnoDB dictionaries not being in a consistent state (with each other) for a SQL statement to be able to access a table. You may disable the foreign_key_checks parameter. As the MySQL documentation[1] clearly warns of the possibility of dictionary inconsistency: "With foreign_key_checks=0, dropping an index required by a foreign key constraint places the table in an inconsistent state and causes the foreign key check that occurs at table load to fail."
The consequence of DDLs run while with foreign_key_checks disabled is that because one of the tables in the FK relationship now has different structure than the other, MySQL can't handle the inconsistency and both tables will go missing.
Reference:
[1] https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_foreign_key_checks
相關內容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前