Details
-
Bug
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
N/A
-
None
Description
--source include/have_innodb.inc
|
|
set foreign_key_checks=0; |
create or replace table t2 (b int, foreign key (b) references t1(a)) engine=InnoDB; |
set foreign_key_checks=1; |
create or replace table t1 (pk int primary key, a int, key(a)) engine=MyISAM; |
check table t2 extended; |
drop table t1, t2; |
bb-11.8-check-table ceb64ee4d1d5af7ab608bbfd35de88510cce82ea |
check table t2 extended;
|
Table Op Msg_type Msg_text
|
test.t2 check Warning No suitable key found for foreign key t2_ibfk_1 in table test.t1
|
test.t2 check error Corrupt
|
It is probably easily justifiable from the implementation point of view, but from a user perspective it's wrong – the key is actually fine in the referenced table, it's everything else (the engine, that is) that's wrong.
Attachments
Issue Links
- is caused by
-
MDEV-34309 CHECK TABLE should check that foreign key relations are correct
-
- Stalled
-