You can turn off foreign key restrictions within your session:

SET SESSION foreign_key_checks = 0;

Then later, turn them back on using

SET SESSION foreign_key_checks = 1;

--
Partha Dutta, Senior Consultant
MySQL Inc, NY, USA, www.mysql.com
 
Are you MySQL certified?  www.mysql.com/certification
 

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Hirschi
> Sent: Wednesday, May 04, 2005 10:50 AM
> To: mysql@lists.mysql.com
> Subject: Re: Foreign Key Restriction
> 
> "Oliver Hirschi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > Hi
> >
> > I updated mySQL 4.0.8 to 4.1.1 and I have now problems with foreign
> key
> > retrictions.
> >
> > Is it right, that mySQL 4.1.x has something changed due to the foreign
> > key restriction?
> > Is there an option to turn off the foreign key restriction in mySQL
> > 4.1.1?
> 
> I found the mistake. There was an INSERT and a foreign-key was setted to
> the value 0. It seems, this was possible with mySQL version 4.0.8, but
> not anymore in version 4.1.x.
> Does anybody known something about that?
> 
> Thanks, Oliver Hirschi
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to