Fixed bogus mysql error code 0 on mid-transaction disconnect

* Now the proper error (e.g. "server has gone away") and code is shown.

Change-Id: If0255101151441c7d05141ffc7cb416ad79e6bd8
Merge "Fixed bogus mysql error code 0 on mid-transaction disconnect"