Hi,

Getting used to transactions in perl/MySQL.

My question is:

when a transaction might fail, what is needed in the error portion of the conditional below?
Does rollback ever fail and so it would be good to force it manually?
Should I add a 'repeat transaction function', so that it will attempt the transaction until it has been successful?
Maybe I should do something else?

Code:
if ($@) {
    warn "Transaction aborted because $@"; 
    $connect->rollback; # undo the incomplete changes
    # add other on-error clean-up code here
}
bazz