Just learned this from personal experience. Hoping to save someone else some pain.
I tried the following searches:
mysql transaction partial rollback does fetching commit an innodb transaction innodb rollback not working
The symptoms I was experiencing included inserted records were rolled back, but an update to a table was not. My PHP code threw an exception inside a transaction, and the catch did a rollback, but the update still went through.
The problem was that the table I was updating happened to be MyISAM. MySQL silently ignored the fact that I included a table in my transaction that couldn’t be rolled back. When the rollback occurred, this was also silently ignored.
Moral of the story: use all InnoDB if you’re going to be doing transactions.