Ref T10860. Currently, if we lose a connection that is holding a MySQL global lock, we may retry the query automatically.
Instead, we should abort, just like we do if we were in the middle of a transaction. Otherwise, code may still think it has the lock and do unsafe things.