denisenkom / go-mssqldb

Microsoft SQL server driver written in go language
BSD 3-Clause "New" or "Revised" License
1.81k stars 493 forks source link

Ignore spurious "rowcount" data from the server #735

Open shueybubbles opened 2 years ago

shueybubbles commented 2 years ago

SQL sends rowcount status tokens in the done message for statements like declare @d int = 1. The driver needs to keep track of whether columns have been sent or if the statement is not a select statement to determine if a real "rows affected" message should be sent.

codecov[bot] commented 2 years ago

Codecov Report

Merging #735 (29bb0e8) into master (e538731) will decrease coverage by 0.06%. The diff coverage is 69.81%.

@@            Coverage Diff             @@
##           master     #735      +/-   ##
==========================================
- Coverage   71.29%   71.23%   -0.07%     
==========================================
  Files          24       24              
  Lines        5386     5416      +30     
==========================================
+ Hits         3840     3858      +18     
- Misses       1301     1312      +11     
- Partials      245      246       +1     
Impacted Files Coverage Δ
mssql.go 86.82% <53.57%> (-0.93%) :arrow_down:
token.go 64.87% <88.00%> (+0.66%) :arrow_up:
tds.go 65.49% <0.00%> (-0.37%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e538731...29bb0e8. Read the comment docs.