t2 doesn't have an a column, but ais selected in the generated SQLs:
mysql> desc t1;
+-------+---------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+------+---------+-------+
| a | int(11) | YES | | NULL | |
+-------+---------+------+------+---------+-------+
1 row in set (0.00 sec)
mysql> desc t2;
+-------+---------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+------+---------+-------+
| b | int(11) | YES | | NULL | |
+-------+---------+------+------+---------+-------+
1 row in set (0.00 sec)
--- SELECT `a` FROM t2; // wrong
--- SELECT `a` FROM t1 WHERE `a` > 7; // correct
t2doesn't have anacolumn, butais selected in the generated SQLs: