Ran
|
Jobs
26
|
Files
18
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Fix issue 1567 (#1570) ### Description closes https://github.com/go-sql-driver/mysql/issues/1567 When TLS is enabled, `mc.netConn` is rewritten after the TLS handshak as detailed here: https://github.com/go-sql-driver/mysql/blob/d86c4527b/packets.go#L355 Therefore, `mc.netConn` should not be accessed within the watcher goroutine. Instead, `mc.rawConn` should be initialized prior to invoking `mc.startWatcher`, and `mc.rawConn` should be used in lieu of `mc.netConn`. ### Checklist - [x] Code compiles correctly - [x] Created tests which fail without the change (if possible) - [x] All tests passing - [x] Extended the README / documentation, if necessary - [x] Added myself / the copyright holder to the AUTHORS file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved variable naming for better code readability and maintenance. - Enhanced network connection handling logic. - **New Features** - Updated TCP connection handling to better support TCP Keepalives. - **Tests** - Added a new test to address and verify the fix for a specific issue related to TLS, connection pooling, and round trip time estimation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
4 of 4 new or added lines in 2 files covered. (100.0%)
443 existing lines in 11 files now uncovered.3122 of 3786 relevant lines covered (82.46%)
1130466.62 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
2 |
82.35 |
-5.15% | errors.go |
8 |
92.09 |
-0.99% | rows.go |
13 |
61.9 |
-12.45% | driver.go |
17 |
77.21 |
-0.49% | statement.go |
20 |
84.51 |
7.81% | connector.go |
22 |
73.25 |
3.04% | fields.go |
33 |
85.14 |
0.18% | utils.go |
37 |
85.8 |
-0.58% | auth.go |
49 |
85.58 |
-1.99% | dsn.go |
95 |
74.23 |
-2.78% | connection.go |
147 |
83.82 |
3.74% | packets.go |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|