Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: call cc.writeError when get io.EOF err #13104

Closed
wants to merge 4 commits into from

Conversation

H-ZeX
Copy link
Contributor

@H-ZeX H-ZeX commented Nov 4, 2019

Signed-off-by: H-ZeX hzx20112012@gmail.com

What problem does this PR solve?

This issue's(#10308) bug had be fix in #11865. However, we can not cover all function that return io.EOF err and convert it to another err, then problem such like #10308 may very likely reappear in some other sql.

What is changed and how it works?

call err = cc.writeError(err) even when get io.EOF.

Check List

existing test.

Code changes

No.

Side effects

No.

Related changes

Release note

  • Write release note for bug-fix or new feature.

Signed-off-by: H-ZeX <hzx20112012@gmail.com>
@H-ZeX
Copy link
Contributor Author

H-ZeX commented Nov 4, 2019

/tests

@codecov
Copy link

codecov bot commented Nov 4, 2019

Codecov Report

Merging #13104 into master will decrease coverage by 0.1067%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##            master     #13104        +/-   ##
===============================================
- Coverage   80.174%   80.0673%   -0.1068%     
===============================================
  Files          468        468                
  Lines       110557     110246       -311     
===============================================
- Hits         88638      88271       -367     
- Misses       15136      15195        +59     
+ Partials      6783       6780         -3

Signed-off-by: H-ZeX <hzx20112012@gmail.com>
@H-ZeX
Copy link
Contributor Author

H-ZeX commented Nov 5, 2019

close

@H-ZeX H-ZeX closed this Nov 5, 2019
@H-ZeX
Copy link
Contributor Author

H-ZeX commented Nov 5, 2019

In server.clientConn.dispatch, there is

	case mysql.ComQuit:
		return io.EOF

so it is better to close this PR to avoid doing harm to the compatibility with mysql protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant