https://i.stack.imgur.com/ZfB0c.jpg
Hi everyone,
I’ve been learning MySQL (exclusively, no experience with PHP yet) from Wiley’s MySQL Administrator’s Bible. I apologize in advance if any of the errors I come up appear to be child’s play to you, but I figured that there’d be no harm in coming here to help polish my studying…
So, just cutting to the chase here – I attempted to demonstrate to myself the “Atomicity” and “Consistency” aspects of an ACID-compliant transaction. Pretty basic. However, when trying to force an error by having money be transferred from account ID 2 to a nonexistant ‘3’, the transaction refused to revert to its previous state, and now poor Hudson is $5000 short after I committed. Can anyone point out why this is so? Thanks!
I look forward to becoming a regular here,
-MyPreQL
You still ran a COMMIT on your transaction. When you have an error, you want to ROLLBACK instead.