Hi

Nothing is wrong! The behaviour of your example is correct, because 
MySQL does not support the concept of foreign keys. See section 1.4.4.5 
of the MySQL manual. In other words data integrity between two tables is 
not ensured by MySQL. Your application code must solve this.

Regards

Rene Moonen


Jostkleigrewe, Heiner wrote:

>>sql,query
>>
>>Hello,
>>
>>i've tried the foreign key-example out of the documentation(3.5.6 Using
>>Foreign Keys) on W2K (3.23.49 + 3.23.50) and LINUX (3.23.49). The tables
>>persons and shirts are created as innodb-tables. 
>>
>>I could insert a shirt for a non-existing person. Also i could delete a
>>person with existing shirts. I have experimented with 'ON DELETE'  and 'ON
>>UPDATE' with no effects.
>>
>>What's wrong? Is there a switch to activate foreign keys?
>>
>>
>>Heiner Jostkleigrewe
>>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to