It sounds crazy, but I can't find any examples of how to know when to rollback in a transaction.
It is obvious that you do ROLLBACK to do it, but when?
I have some INSERTS, UPDATES, etc. that need to take place in a transaction. This is MySQL 5.0 inside of a Stored Procedure or Stored Function. What do I do to test for failure on these and rollback? Please provide examples.
Thanks