Give me SAFETY!
A recipe for safety
- Use transactions (don't use AutoCommit)
- Use RaiseError
- Use eval { … } to catch errors and rollback
Notes:
must be an ‘atomic’ operation.
Can’t allow debit without the credit.
Server-side errors: disk crash etc
Client side errors: program die()’s or is killed