With current fix, the client will get back deadlock error, when transaction size grows too large. Deadlock error is not good error code here, as it guides the client to retry the transaction, and retrying will never succeed, if transaction limits remain the same.
Therefore, the fix should be modified to use some other error code. Unfortunately there is no good choices for too large transaction error among MySQL server error codes. One potential error code could be:
With current fix, the client will get back deadlock error, when transaction size grows too large. Deadlock error is not good error code here, as it guides the client to retry the transaction, and retrying will never succeed, if transaction limits remain the same.
Therefore, the fix should be modified to use some other error code. Unfortunately there is no good choices for too large transaction error among MySQL server error codes. One potential error code could be:
ERROR 1180 (HY000): Got error # during COMMIT