I'm trying to add a new foreign key without any FK checks or tables locked.
I tried this (with and without "GLOBAL"):
However, I get this error:
#1846 - LOCK=NONE is not supported. Reason: Adding foreign keys needs foreign_key_checks=OFF. Try LOCK=SHARED
Then I tried without "ONLINE":
However, the "main_table" gets immediately locked for many queries, with "Waiting for table metadata lock".
If I'm disabling FOREIGN_KEY_CHECKS, isn't the ALTER TABLE supposed to be performed ONLINE, without locking any tables and without checking for integrity?