Skip to content

Added needsPrepare Check and removed error code 99586 check#629

Merged
cheenamalhotra merged 4 commits intomicrosoft:devfrom
cheenamalhotra:retry-fix
Feb 16, 2018
Merged

Added needsPrepare Check and removed error code 99586 check#629
cheenamalhotra merged 4 commits intomicrosoft:devfrom
cheenamalhotra:retry-fix

Conversation

@cheenamalhotra
Copy link
Copy Markdown
Member

No description provided.

@cheenamalhotra cheenamalhotra added this to the 6.4.0 milestone Feb 15, 2018
@TobiasSQL TobiasSQL self-requested a review February 15, 2018 22:10
/** True if this execute has been called for this statement at least once */
private boolean isExecutedAtLeastOnce = false;

private boolean needsPrepare = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need needsPrepare as a instance field? Should always be local variable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

}

String dbName = connection.getSCatalog();
boolean needsPrepare = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the default true to be safe (better prepare than not). Should not matter but just to be a bit defensive...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise things look good :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified to true.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 16, 2018

Codecov Report

Merging #629 into dev will increase coverage by 0.05%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #629      +/-   ##
============================================
+ Coverage     46.52%   46.57%   +0.05%     
- Complexity     2223     2228       +5     
============================================
  Files           109      109              
  Lines         25408    25409       +1     
  Branches       4186     4187       +1     
============================================
+ Hits          11821    11835      +14     
+ Misses        11554    11544      -10     
+ Partials       2033     2030       -3
Flag Coverage Δ Complexity Δ
#JDBC42 46.41% <42.85%> (ø) 2219 <2> (-3) ⬇️
#JDBC43 46.54% <42.85%> (+0.17%) 2226 <2> (+10) ⬆️
Impacted Files Coverage Δ Complexity Δ
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 50.53% <42.85%> (+0.04%) 155 <2> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 42.69% <0%> (-2.25%) 14% <0%> (-2%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 54.2% <0%> (-0.27%) 0% <0%> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerStatement.java 59.34% <0%> (-0.11%) 130% <0%> (-1%)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 33.27% <0%> (+0.12%) 245% <0%> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 52.8% <0%> (+0.19%) 241% <0%> (+3%) ⬆️
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 63.2% <0%> (+0.3%) 0% <0%> (ø) ⬇️
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 39.18% <0%> (+0.42%) 43% <0%> (+1%) ⬆️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 61.35% <0%> (+0.43%) 89% <0%> (+1%) ⬆️
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 54.21% <0%> (+1.2%) 30% <0%> (+1%) ⬆️
... and 1 more

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 a64b9ef...ea723f6. Read the comment docs.

@cheenamalhotra cheenamalhotra merged commit 782dd1b into microsoft:dev Feb 16, 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.

3 participants