-
Martin Skold authored
This is a patch for supporting toggling on/off of foreign key checking in ndb. Innodb supports set foreign_key_checks = 0; to immediately disable all foreign key checking, even if set inside an ongoing transaction. All operations prior to the setting will have foreign key constraints checked and all operations after will not. For Innodb these checks are done immediately, but for Ndb the setting set ndb_deferred_constraints = 1; will defer the foreign key checks until commit time. The setting of foreign_key_checks = 0; inside a transaction will only affect operations executed after the change, operations done before will cause foreign keys to be checked. The setting of foreign_key_checks = 0 will of course also disable any defined cascade of deletes or updates. The implementation disables Ndb's internal triggers for foreign key checking inside TUP so it will also have a performance improvement during restoring backups with foreign key checks disabled.
Martin Skold authoredThis is a patch for supporting toggling on/off of foreign key checking in ndb. Innodb supports set foreign_key_checks = 0; to immediately disable all foreign key checking, even if set inside an ongoing transaction. All operations prior to the setting will have foreign key constraints checked and all operations after will not. For Innodb these checks are done immediately, but for Ndb the setting set ndb_deferred_constraints = 1; will defer the foreign key checks until commit time. The setting of foreign_key_checks = 0; inside a transaction will only affect operations executed after the change, operations done before will cause foreign keys to be checked. The setting of foreign_key_checks = 0 will of course also disable any defined cascade of deletes or updates. The implementation disables Ndb's internal triggers for foreign key checking inside TUP so it will also have a performance improvement during restoring backups with foreign key checks disabled.
Loading