Oliver Hirschi wrote:

"Partha Dutta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]

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;



I saw, that the tables on my mySQLVersion 4.0.8 are of type MyISAM and
the tables on mySQL 4.1.1 are of type InnoDB, but they are created with
the same SQL-Script.

Could be this difference, that I could INSERT a record with a
foreignkey-value 0 on mySQL 4.0.8?

Thanks in advanced,
Oliver Hirschi

It's not the version of mysql that matters, it's the table type. MyISAM tables don't support foreign key constraints. See the manual for details:


<http://dev.mysql.com/doc/mysql/en/ansi-diff-foreign-keys.html>
<http://dev.mysql.com/doc/mysql/en/myisam-storage-engine.html>
<http://dev.mysql.com/doc/mysql/en/innodb.html>

If your tables were created as MyISAM on one server and InnoDB on the other using the same script, then I'd guess the script doesn't specify the table type, and you have different settings for the default table type on the two servers.

Michael


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



Reply via email to