MySQL Advanced - Transactions and sequences