Skip to content

String index out of range parameter metadata#353

Merged
xiangyushawn merged 3 commits intomicrosoft:RTW_6.2.0from
xiangyushawn:String-index-out-of-range-parameter-metadata
Jun 26, 2017
Merged

String index out of range parameter metadata#353
xiangyushawn merged 3 commits intomicrosoft:RTW_6.2.0from
xiangyushawn:String-index-out-of-range-parameter-metadata

Conversation

@xiangyushawn
Copy link
Copy Markdown
Contributor

@xiangyushawn xiangyushawn commented Jun 21, 2017

fix an existing bug when getting parameter metadata and column name has end comment mark and space. Better to merge this PR as soon as possible.

xiangyushawn added a commit to xiangyushawn/mssql-jdbc-xiangs that referenced this pull request Jun 21, 2017
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 21, 2017

Codecov Report

Merging #353 into RTW_6.2.0 will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@               Coverage Diff               @@
##             RTW_6.2.0     #353      +/-   ##
===============================================
- Coverage        40.05%   40.04%   -0.01%     
- Complexity        1878     1879       +1     
===============================================
  Files              107      107              
  Lines            24480    24482       +2     
  Branches          4036     4037       +1     
===============================================
- Hits              9805     9804       -1     
+ Misses           12838    12833       -5     
- Partials          1837     1845       +8
Flag Coverage Δ Complexity Δ
#JDBC41 39.97% <0%> (+0.04%) 1875 <0> (+4) ⬆️
#JDBC42 39.87% <0%> (-0.09%) 1869 <0> (-6)
Impacted Files Coverage Δ Complexity Δ
...oft/sqlserver/jdbc/SQLServerParameterMetaData.java 25.52% <0%> (-0.13%) 30 <0> (ø)
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 47.27% <0%> (-0.46%) 63% <0%> (-1%)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 27.23% <0%> (-0.42%) 187% <0%> (-4%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 44.75% <0%> (-0.24%) 0% <0%> (ø)
...soft/sqlserver/jdbc/SQLServerDatabaseMetaData.java 28.89% <0%> (-0.23%) 46% <0%> (ø)
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 44.94% <0%> (ø) 16% <0%> (ø) ⬇️
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 39.59% <0%> (+0.2%) 0% <0%> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 49.14% <0%> (+0.21%) 212% <0%> (+2%) ⬆️
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 41.7% <0%> (+0.25%) 129% <0%> (ø) ⬇️
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 30.11% <0%> (+0.67%) 58% <0%> (+2%) ⬆️
... and 3 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 33814db...5d1f7ed. Read the comment docs.

*/
@Test
public void testQueryWithSpaceAndEndCommentMarkInColumnName() throws SQLServerException {
pstmt = connection.prepareStatement("SELECT [c1*/someStrintg withspace] from " + spaceTable);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

theres an extra t character in "someStrintg withspace"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done, thank you.

}

private static void createSpaceTable() throws SQLException {
stmt.execute("Create table " + spaceTable + " (" + "[c1*/someStrintg withspace] char(50) not null," + "c2 varchar(20) not null,"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

theres an extra t character in "someStrintg withspace"

@xiangyushawn xiangyushawn merged commit 0f3e8e9 into microsoft:RTW_6.2.0 Jun 26, 2017
@xiangyushawn xiangyushawn deleted the String-index-out-of-range-parameter-metadata branch June 26, 2017 22:59
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