similar to ON DELETE CASCADE not working in MySQL, but something is not right:
-- test delet
(assuming that should be a "foreign key" not a "primary key" in table t2)
MySQL simply ignores all inline foreign key constraints without a warning.
Therefore, you need to explicitly add a foreign key constraint as shown by dnagirl.