Sep 15, 2010

MySQL InnoDB RI management

MySQL InnoDB engine supports Reference Integrity checks (RI). Sometimes we need to do some "big" changes in a schema or data (reconstruct table, repopulate data, etc). RI can prevent us from those actions.
To turn RI on and off we can use following directive:
-- turn RI off
foreign_key_constraints=0
-- ...
-- do some stuff
-- ...
-- turn RI on
foreign_key_constraints=0

No comments: