kill all pending transactions This function will terminate all pending transactions. This can be used for resetting infinite loops in stored procedures etc. The code determines the error reported to the client. Number 6 is preferable, corresponding to the 'transaction rolled back due to previous SQL error'. Once any SQL statement or procedure notices that its transaction is dead, e.g. deadlocked, it signals the error and takes appropriate action, which is typically to signal the error to the caller and ultimately to the client.
kill all pending transactions
This function will terminate all pending transactions. This can be used
for resetting infinite loops in stored procedures etc.
The code determines the error reported to the client. Number 6 is preferable,
corresponding to the 'transaction rolled back due to previous SQL error'.
Once any SQL statement or procedure notices that its transaction is dead,
e.g. deadlocked, it signals the error and takes appropriate action, which is typically
to signal the error to the caller and ultimately to the client.