Bug #43781 Foreign keys: ./mysqld crashes if sees a table created in --foreign-key-all-engi
Submitted: 21 Mar 2009 17:13 Modified: 20 Dec 2013 7:04
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:6.1-fk OS:Any
Assigned to: CPU Architecture:Any

[21 Mar 2009 17:13] Konstantin Osipov
Description:
I start ./mysqld with --foreign-key-all-engines.
I create a table that has foreign keys:

create table t1 (a int primary key, b int references t1 (a) on update restrict on delete restrict);

I shutdown the server. I start it without --foreign-key-all-engines.
I do:
delete from t1;

The server asserts and crashes:

mysqld: sql_base.cc:3936: int open_tables(THD*, TABLE_LIST**, uint*, uint): Assertion `opt_fk_all_engines' failed.
[1]    8573 abort (core dumped)  ./mysqld

How to repeat:
See description.

Suggested fix:
Produce a meaningful error when trying to open an FRM with new foreign keys
(the fix perhaps needs to go to 5.1 or 6.0).
[22 Mar 2009 2:58] MySQL Verification Team
Thank you for the bug report.
[20 Dec 2013 7:04] Erlend Dahl
The 6.x project was abandoned years ago.