-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
sql server ADO driver bugs on windows #10637
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
djova
added a commit
that referenced
this pull request
Nov 18, 2021
If a file in the pipeline setup scripts directory starts with an underscore, then it is treated as a "non-executable" file and it will not be executed. This is required for #10637 where a large SQL setup script is needed to be referenced by one of the other scripts, but the SQL script itself must not be executed.
4 tasks
djova
added a commit
that referenced
this pull request
Nov 18, 2021
Required for #10637 The test suite improvements in that PR which expand Windows test coverage are what surfaced this bug.
4 tasks
djova
added a commit
that referenced
this pull request
Nov 19, 2021
If a file in the pipeline setup scripts directory starts with an underscore, then it is treated as a "non-executable" file and it will not be executed. This is required for #10637 where a large SQL setup script is needed to be referenced by one of the other scripts, but the SQL script itself must not be executed.
59edc7d
to
0f6a047
Compare
djova
added a commit
that referenced
this pull request
Nov 19, 2021
* fix `mmh3.hash64` unicode exception with python2 on Windows Required for #10637 The test suite improvements in that PR which expand Windows test coverage are what surfaced this bug. * add unicode test case
Fixes several bugs with the SQL Server integration when running on Windows with the `MSOLEDBSQL` driver: * `cursor.execute` was not handling a list of parameters with ADO as varargs like it does with ODBC. Update to pass the arguments so it works in all cases. * The python2 ADO provider was failing to properly pass on raw bytes to the `PLAN_LOOKUP_QUERY` so the query is now updated to receive the hashes as hex strings and have the database do the conversion to bytes. Additional testing improvements: * add `MSOLEDBSQL` to the list of valid ADO providers to test * install the ``MSOLEDBSQL driver in the azure test VM * update the SQL Server test VM setup to match what is used for the SQL Server linux docker tests * run the `test_statement_metrics_and_plans` tests for both the SQL Server Windows local VM as well as the Docker VM
0f6a047
to
b8c637a
Compare
coignetp
approved these changes
Nov 19, 2021
fanny-jiang
pushed a commit
that referenced
this pull request
Nov 19, 2021
* sql server fix windows ado bugs Fixes several bugs with the SQL Server integration when running on Windows with the `MSOLEDBSQL` driver: * `cursor.execute` was not handling a list of parameters with ADO as varargs like it does with ODBC. Update to pass the arguments so it works in all cases. * The python2 ADO provider was failing to properly pass on raw bytes to the `PLAN_LOOKUP_QUERY` so the query is now updated to receive the hashes as hex strings and have the database do the conversion to bytes. Additional testing improvements: * add `MSOLEDBSQL` to the list of valid ADO providers to test * install the ``MSOLEDBSQL driver in the azure test VM * update the SQL Server test VM setup to match what is used for the SQL Server linux docker tests * run the `test_statement_metrics_and_plans` tests for both the SQL Server Windows local VM as well as the Docker VM * bump checks base minimum version (cherry picked from commit 4dd0c5e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes several bugs with the SQL Server integration when running on Windows with the
MSOLEDBSQL
driver:cursor.execute
was not handling a list of parameters with ADO as varargs like it does with ODBC. Update to pass the arguments so it works in all cases.PLAN_LOOKUP_QUERY
so the query is now updated to receive the hashes as hex strings and have the database do the conversion to bytes.Additional testing improvements:
MSOLEDBSQL
to the list of valid ADO providers to testMSOLEDBSQL
driver in the azure test VMtest_statement_metrics_and_plans
tests for both the SQL Server Windows local VM as well as the Docker VMMotivation
Fixes bugs with the SQL Server integration when running on Windows with the
MSOLEDBSQL
driver.Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached