CREATE TABLE `t1` (
  `t1_id` int(11) NOT NULL
);
INSERT INTO t1 VALUES (1), (2), (3), (5), (8), (13);

CREATE TABLE `t2` (
  `t2_id` int(11) NOT NULL
);
INSERT INTO t2 VALUES (2), (3), (5), (7), (11), (13);

/* simulate a typo where where the t2_id is used instead of t1_id */
/* since table t1 does not have a column t2_id, we expect it to fail */
DELETE FROM t2 where t2_id IN ( SELECT t2_id FROM t1 );

SELECT	t2_rows,
	CASE
		WHEN (t2_rows) = 6 THEN 'YAY'
		WHEN (t2_rows) = 3 THEN 'OK'
		ELSE 'DARN'
	END AS _result
FROM	(SELECT COUNT(*) AS t2_rows FROM t2) AS c2;

