microsoft/mssql-jdbc

[BUG] Revamp parsing logic that relies on FMTONLY

peterbae opened this issue · 5 comments

Currently there are multiple issues open that rely on correctly parsing the user's SQL statement and using FMTONLY to query the database for the column metadata. This issue will keep a cumulative track of such issues until the parsing logic has been revamped.

List of issues related to parsing the SQL query for FMTONLY:
#493
#848
#887
#911
#921

Hi @gs-rezaem, @and-costea, @jkoskela, @mohitj13, and @drewclauson
The team has recently created a PR #1044 which should address these issues. I'd like to invite you to test the PR and see if the problems are resolved on your end. The team has tested internally and the PR should resolve all of the issues listed above. You can clone the PR from the branch and turn the new property on by specifying useFmtOnly=true in the connection string, or by using SQLServerDatasource.setFmtOnly(true).

@vborisoff can you please followup? Have a look at #493 to find the reproducible issue. You'll need to clone this repository, setup a local test environment, switch to the PR branch and test using the code in #493.

@gs-rezaem : I have tested the pull request #1044 against Azure SQL server. The PR #1044 has the issue from #493 resolved. I ran the original issue code with "userFmtOnly=true" added to mssql_jdbc_test_connection_properties, and had getParameterMetaData() returning SQLServerParameterMetaData as expected.

thank you

@rene-ye #493 is resolved by the PR. Thanks @vborisoff

#1044 has been merged and will be available starting next release, closing the issue.