node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Fix error code for protocol error

Open KunZhou-at opened this issue 2 years ago • 3 comments

The error code emitted for ER_CLIENT_INTERACTION_TIMEOUT is "4031" instead of the expected "ER_CLIENT_INTERACTION_TIMEOUT", this fixes that.

KunZhou-at avatar Oct 25 '23 20:10 KunZhou-at

cc @wellwelwel bump on this

KunZhou-at avatar Apr 16 '24 02:04 KunZhou-at

cc @wellwelwel bump on this

@KunZhou-at, thank you for your many contributions 💙

This one in particular I couldn't figure out what the issue was and what the solution does. Could you please show a failure that occurs without your fix?

More personally, when I see that no tests have been changed and a new test covers a failure, I usually merge the PRs. When I don't understand or I realize a decision would need to be taken, I usually leave it to @sidorares and also to the community 🤝

wellwelwel avatar Apr 17 '24 08:04 wellwelwel

@wellwelwel I believe error.code is a number in the current code for ER_CLIENT_INTERACTION_TIMEOUT but we have always propagated the error.code to the client as a string elsewhere (for other errors). So this seems to be inconsistent behavior.

KunZhou-at avatar Apr 17 '24 19:04 KunZhou-at

@wellwelwel Closing since it's not getting attention. Feel free to open and I can resolve the conflicts if that changes.

KunZhou-at avatar May 15 '24 23:05 KunZhou-at