Improve error handling
This patch was authored and released by @gwynne.
- "Connection closed" errors are now correctly reported when trying to issue queries on closed connections, instead of throwing various NIO errors.
- Query syntax errors are now explicitly reported.
- Unique constraint violation errors are now more consistently reported.
semver-minor
due to adding a new case on MySQLError
.