Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 114735

Summary: mysql-5.0.16-r3 innodb tables do not check foreign key constraints
Product: Gentoo Linux Reporter: Gerben Gieling <gerben.gieling>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gerben Gieling 2005-12-07 04:35:29 UTC
I exported my tables using mysqldump out of mysql 4.0 emerged mysql-5.0.16-r3
and loaded the mysqldump file back into the new mysql. Even though the table
definitions were in wrong order, data was loaded without error message.
Also when I deleted a row in table a, related rows in tables b and c having
foreign key constraints to table a (on delete cascade) were not deleted.
The same for update constraints

Reproducible: Always
Steps to Reproduce:
1.emerge mysql-5.0.16-r3
2.restore old (innodb) databases with foreign key constraints
3.remove or update a row in a cited table

Actual Results:  
related rows in citing tables not removed/updated

Expected Results:  
related rows in citing table should be removed/updated

The ebuild contains the option --skip-innodb on line 730.
Why is this?
I assumed that the removal of the innodb use variable would enable innodb as
standard instead of removing it
Comment 1 Francesco R. (RETIRED) gentoo-dev 2005-12-07 08:10:22 UTC
(In reply to comment #0)
> I exported my tables using mysqldump out of mysql 4.0 emerged mysql-5.0.16-r3
> and loaded the mysqldump file back into the new mysql. Even though the table
> definitions were in wrong order, data was loaded without error message.
> Also when I deleted a row in table a, related rows in tables b and c having
> foreign key constraints to table a (on delete cascade) were not deleted.
> The same for update constraints

too huge problem for my little energies, some hints:
read http://dev.mysql.com/doc/refman/5.0/en/upgrade.html
one of suggestion is:
----------
As a general rule, we recommend that when upgrading from one release series to
another, you should go to the next series rather than skipping a series. For
example, if you currently are running MySQL 3.23 and wish to upgrade to a newer
series, upgrade to MySQL 4.0 rather than to 4.1 or 5.0.
----------

[...]

> The ebuild contains the option --skip-innodb on line 730.
> Why is this?
> I assumed that the removal of the innodb use variable would enable innodb as
> standard instead of removing it

this is used to initialize a database in the function pkg_config() , it's called
only during a "emerge --config mysql"

innodb actually is always _compiled_ in so to disable a "skip-innodb" in the
my.cnf file is needed. Further note, this may change in a not so far future and
go back to an optional innodb use flag.

Regards,
Francesco R.