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 SQLServerDatabaseMetadata.getMaxConnections() API query #1009

Merged
merged 11 commits into from
May 14, 2019

Conversation

cheenamalhotra
Copy link
Member

Currently driver was using sp_configure to fetch 'user connections' configuration which is not correct way to do it. Also with SQL Server 2019, this configuration is moved to 'Advanced Options' hence cannot be run directly as with older SQL Servers.

This PR modifies the query and executes SELECT from sys.configurations which is the recommended way for gathering metadata information.

@codecov-io
Copy link

codecov-io commented Mar 24, 2019

Codecov Report

Merging #1009 into dev will decrease coverage by 0.05%.
The diff coverage is 11.11%.

Impacted file tree graph

@@             Coverage Diff             @@
##               dev    #1009      +/-   ##
===========================================
- Coverage       53%   52.94%   -0.06%     
+ Complexity    3149     3140       -9     
===========================================
  Files          119      119              
  Lines        27943    27947       +4     
  Branches      4668     4671       +3     
===========================================
- Hits         14811    14797      -14     
- Misses       10911    10921      +10     
- Partials      2221     2229       +8
Impacted Files Coverage Δ Complexity Δ
...soft/sqlserver/jdbc/SQLServerDatabaseMetaData.java 36.99% <11.11%> (+0.17%) 70 <1> (+1) ⬆️
...om/microsoft/sqlserver/jdbc/SimpleInputStream.java 55.97% <0%> (-1.5%) 15% <0%> (-1%)
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 59.76% <0%> (-1.19%) 34% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 47.51% <0%> (-1.08%) 111% <0%> (-2%)
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 38.79% <0%> (-0.44%) 43% <0%> (-1%)
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 59.69% <0%> (-0.44%) 90% <0%> (-1%)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 44.18% <0%> (-0.2%) 327% <0%> (-3%)
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 68.59% <0%> (-0.12%) 0% <0%> (ø)
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 51.56% <0%> (-0.07%) 255% <0%> (-1%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 61.2% <0%> (+0.13%) 0% <0%> (ø) ⬇️

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 2c965e2...9dfa996. Read the comment docs.

@cheenamalhotra cheenamalhotra added this to the 7.3.1 milestone Mar 28, 2019
peterbae
peterbae previously approved these changes Apr 8, 2019
rene-ye
rene-ye previously approved these changes Apr 8, 2019
@cheenamalhotra cheenamalhotra dismissed stale reviews from rene-ye and peterbae via 3fd3e60 April 8, 2019 17:43
rene-ye
rene-ye previously approved these changes Apr 8, 2019
peterbae
peterbae previously approved these changes Apr 8, 2019
lilgreenbird
lilgreenbird previously approved these changes Apr 8, 2019
@cheenamalhotra cheenamalhotra dismissed stale reviews from lilgreenbird, peterbae, and rene-ye via 6cc07a8 April 17, 2019 23:57
peterbae
peterbae previously approved these changes Apr 25, 2019
rene-ye
rene-ye previously approved these changes Apr 29, 2019
peterbae
peterbae previously approved these changes May 10, 2019
lilgreenbird
lilgreenbird previously approved these changes May 13, 2019
# Conflicts:
#	src/test/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionTest.java
@cheenamalhotra cheenamalhotra dismissed stale reviews from lilgreenbird, peterbae, and rene-ye via 9dfa996 May 13, 2019 19:08
@cheenamalhotra cheenamalhotra merged commit 5c2c73d into microsoft:dev May 14, 2019
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.

6 participants