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

Fix issue with setAutoCommit leaving a transaction behind in Azure DW #881

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

peterbae
Copy link
Contributor

Fixed issue #872.

Currently, when we call setAutoCommit(), we execute this query:

IF @@TRANCOUNT > 0 COMMIT TRAN set implicit_transactions off 

This still leaves a transaction open in Azure DW, according to MSDN documents.

To fix this issue, we're going to execute this query instead:

set implicit_transactions off IF @@TRANCOUNT > 0 COMMIT TRAN 

Which should do the same thing except it fixes the aforementioned issue in Azure DW.

@codecov-io
Copy link

codecov-io commented Nov 17, 2018

Codecov Report

Merging #881 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #881      +/-   ##
============================================
+ Coverage     48.71%   48.71%   +<.01%     
- Complexity     2797     2801       +4     
============================================
  Files           116      116              
  Lines         27877    27877              
  Branches       4650     4650              
============================================
+ Hits          13579    13581       +2     
- Misses        12093    12094       +1     
+ Partials       2205     2202       -3
Flag Coverage Δ Complexity Δ
#JDBC42 48.25% <100%> (+0.03%) 2759 <0> (+3) ⬆️
#JDBC43 48.62% <100%> (+0.03%) 2794 <0> (+6) ⬆️
Impacted Files Coverage Δ Complexity Δ
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 48.09% <100%> (ø) 335 <0> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 43.95% <0%> (-3.3%) 15% <0%> (ø)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 44.42% <0%> (-1.32%) 106% <0%> (-2%)
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 62.45% <0%> (-0.06%) 0% <0%> (ø)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 56.24% <0%> (-0.04%) 0% <0%> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 33.11% <0%> (+0.34%) 260% <0%> (+4%) ⬆️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 61.42% <0%> (+0.43%) 90% <0%> (+1%) ⬆️
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 59.52% <0%> (+1.19%) 34% <0%> (+1%) ⬆️

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 eb64bfe...85e77d6. Read the comment docs.

@cheenamalhotra cheenamalhotra added this to the 7.1.3 milestone Nov 20, 2018
@cheenamalhotra cheenamalhotra merged commit 161b0bb into microsoft:dev Nov 22, 2018
ulvii pushed a commit that referenced this pull request Nov 30, 2018
ulvii added a commit that referenced this pull request Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants