I have to write a complex script that inserts data into many tables. While the import there will be violated many foreign key constraints. Therefore I disabled them by "SET FOREIGN_KEY_CHECKS = 0".
If I enable them after the inserstion by "SET FOREIGN_KEY_CHECKS = 1" MySQL performs no foreign key check so if I had inserted some corrupt data nobody will know it. Is it possible to enforce a foreign key check? Or is there any other way of securely inserting such data?