Hey,
I have an application using the C API that is doing a REPLACE command
into an innodb table that has other tables with cascading deletes
relying on it's entries. Rather than use an UPDATE/Check
affected/Insert/Check success/repeat method we have wrapped the REPLACE
query in a SET FOREIGN_KEY_CHECKS=0; then after SET
FOREIGN_KEY_CHECKS=1; pair of commands. This is working great in our
dev and test environments but its been discovered that on our production
servers it is apparently having no effect and the cascading deletes are
occurring anyway.
So, the first thing I thought was 'something must be wrong with the
permissions' but I've been unable to find any discrepancies and the
manual doesn't seem to indicate you even need any special permissions to
execute the set command. Has anyone else experienced anything similar?
Does anyone have any ideas what environmental differences could cause
the SET FOREIGN_KEY_CHECKS command to be ignored? I'm at my wits end
here... any suggestions appreciated.
John A. McCaskey