EVOLUTION-MANAGER
Edit File: foreign_key_insert_nonexistent.result
DROP DATABASE test; CREATE DATABASE test; USE test; CREATE TABLE comments ( id int unsigned PRIMARY KEY, content varchar(140) NOT NULL ); CREATE TABLE entries ( content varchar(140) NOT NULL, comment_id int unsigned, FOREIGN KEY (comment_id) REFERENCES comments (id) ); INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (foreign record doesn't exist: <comment_id>:<1>) SELECT * FROM entries; content comment_id SELECT * FROM comments; id content SELECT mroonga_command('dump --dump_plugins no'); mroonga_command('dump --dump_plugins no') table_create comments TABLE_PAT_KEY UInt32 column_create comments content COLUMN_SCALAR ShortText column_create comments id COLUMN_SCALAR UInt32 table_create entries TABLE_NO_KEY column_create entries content COLUMN_SCALAR ShortText table_create mroonga_operations TABLE_NO_KEY column_create mroonga_operations record COLUMN_SCALAR UInt32 column_create mroonga_operations table COLUMN_SCALAR ShortText column_create mroonga_operations type COLUMN_SCALAR ShortText column_create entries comment_id COLUMN_SCALAR comments column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id DROP TABLE entries; DROP TABLE comments;