mysql> create table test_1 (id integer not null primary key) type=InnoDB;
Query OK, 0 rows affected, 1 warning (0.02 sec)
mysql> create table test_2 (id integer not null primary key references test_1(id) on delete cascade) type=InnoDB;
Query OK, 0 rows affected, 1 warning (0.04 sec)
Question: was foreign key actually created on the table and will cascade deletes function?
mysql> insert into test_2 values (666);
Query OK, 1 row affected (0.01 sec)
Oh, it wasn't. Because MySQL actually accepts foreign key definitions in slightly different format, but doesn't bother to fucking tell me it just ignored half of table definition and ABORT THE TABLE CREATION. I hate this piece of shit excuse for a database more and more every time I have to deal with it.