Skip to content

CHORE: Upgrade bundled ODBC driver from 18.5.1.1 to 18.6.2.1#569

Merged
gargsaumya merged 4 commits into
mainfrom
saumya/upgrade-odbc
May 25, 2026
Merged

CHORE: Upgrade bundled ODBC driver from 18.5.1.1 to 18.6.2.1#569
gargsaumya merged 4 commits into
mainfrom
saumya/upgrade-odbc

Conversation

@gargsaumya

@gargsaumya gargsaumya commented May 12, 2026

Copy link
Copy Markdown
Contributor

Work Item / Issue Reference

AB#41573

GitHub Issue: #<ISSUE_NUMBER>


Summary

This pull request updates the project to use Microsoft ODBC Driver 18.6.2.1 for SQL Server instead of 18.5.x and updates the associated license file. The changes ensure that all references, downloads, and verifications in the CI pipeline are aligned with the new driver version, and the license file includes additional clarifications and regional information.

ODBC Driver Version Update:

  • Updated all download URLs, installer paths, and verification steps in eng/pipelines/pr-validation-pipeline.yml to use ODBC Driver 18.6.2.1 instead of 18.5.x for all supported platforms and architectures. [1] [2] [3] [4] [5] [6] [7] [8] [9]

License File Update:

  • Added and clarified terms in MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt, including more detailed distribution rights, restrictions, and limitations, as well as additional regional variations and French translations for Canadian users. [1] [2] [3]

@github-actions github-actions Bot added the pr-size: large Substantial code update label May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

25%


📈 Total Lines Covered: 7039 out of 27155
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

  • mssql_python/pybind/ddbc_bindings.cpp (100%)

Summary

  • Total: 1 line
  • Missing: 0 lines
  • Coverage: 100%

📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.build._deps.simdutf-src.src.haswell.implementation.cpp: 0.4%
mssql_python.pybind.build._deps.simdutf-src.src.implementation.cpp: 6.7%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.implementation.h: 10.4%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.scalar.utf16_to_utf8.utf16_to_utf8.h: 25.3%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.7%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.internal.isadetection.h: 65.3%
mssql_python.row.py: 70.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 74.2%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@gargsaumya gargsaumya marked this pull request as ready for review May 19, 2026 03:32
Copilot AI review requested due to automatic review settings May 19, 2026 03:32

Copilot AI left a comment

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.

Pull request overview

Upgrades the bundled Microsoft ODBC Driver for SQL Server from 18.5.1.1 to 18.6.2.1 across all supported platforms (Windows x64/x86/arm64, macOS x86_64/arm64, Linux debian_ubuntu/rhel/alpine/suse for x86_64 and arm64). Updates the binary references, CI download URLs/verification commands, and license/release-notes files that ship with the wheel.

Changes:

  • Update Linux .so filename from libmsodbcsql-18.5.so.1.1 to libmsodbcsql-18.6.so.2.1 in ddbc_bindings.cpp, test_000_dependencies.py, build.sh, and the pipeline ldd checks.
  • Update PR validation pipeline to download the new MSI (linkid 2358430) and the new Alpine msodbcsql18_18.6.2.1-1 APKs/signatures (new download path 0b3d5518-...).
  • Replace bundled Windows/macOS/Linux license files and macOS/Linux release-notes for the new driver version, and add a new license file for linux/suse/x86_64.

Reviewed changes

Copilot reviewed 18 out of 53 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
mssql_python/pybind/ddbc_bindings.cpp Updates Linux driver .so filename in GetDriverPathCpp.
mssql_python/pybind/build.sh Updates patchelf example comment to new .so name.
tests/test_000_dependencies.py Updates expected driver .so filename in three locations.
eng/pipelines/pr-validation-pipeline.yml Updates MSI/APK URLs, package filenames, and ldd paths to 18.6.2.1; trailing blank lines added.
mssql_python/libs/windows/{x64,x86,arm64}/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Updated EULA text — but all non-ASCII chars are mojibake ().
mssql_python/libs/macos/{x86_64,arm64}/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Same EULA mojibake issue.
mssql_python/libs/macos/{x86_64,arm64}/share/doc/msodbcsql18/RELEASE_NOTES Prepends 18.6.x changelog entries.
mssql_python/libs/linux/alpine/arm64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Updated EULA text — non-ASCII chars are mojibake.
mssql_python/libs/linux/alpine/x86_64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Content replaced with RELEASE_NOTES changelog instead of EULA.
mssql_python/libs/linux/rhel/{x86_64,arm64}/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Content replaced with RELEASE_NOTES changelog instead of EULA.
mssql_python/libs/linux/debian_ubuntu/{x86_64,arm64}/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Content replaced with RELEASE_NOTES changelog instead of EULA.
mssql_python/libs/linux/suse/x86_64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt New file; EULA text with the same mojibake issue.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eng/pipelines/pr-validation-pipeline.yml Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 18 out of 53 changed files in this pull request and generated 3 comments.

Comment thread mssql_python/libs/windows/x64/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Outdated
Comment thread mssql_python/libs/windows/x86/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Outdated
Comment thread mssql_python/libs/windows/arm64/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Outdated
@gargsaumya gargsaumya force-pushed the saumya/upgrade-odbc branch from a7d4057 to 72e52f1 Compare May 19, 2026 04:40

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 18 out of 53 changed files in this pull request and generated 2 comments.

Comment thread mssql_python/pybind/build.sh
Comment thread mssql_python/libs/windows/x64/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt Outdated

@bewithgaurav bewithgaurav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

checked all 53 files. binary swaps look right across all 6 platform/arch combos, pipeline download URLs and ldd paths all point at 18.6.2.1, ddbc_bindings.cpp driver path on linux updated, tests match. one stale 18.5 reference in the pipeline but it's in a commented-out block (line 2311), not worth touching. encoding fix for the license files landed clean in the follow-up commits, french text and smart quotes render correctly in UTF-8. 100% diff coverage on the one code line. all 28 CI checks green. lgtm.

@gargsaumya gargsaumya merged commit 95b7257 into main May 25, 2026
29 checks passed
@jahnvi480 jahnvi480 mentioned this pull request May 29, 2026
jahnvi480 added a commit that referenced this pull request May 29, 2026
[AB#43993](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/43993)

### Summary

Release mssql-python v1.8.0.

### Enhancements
- **ActiveDirectoryMSI Support for Bulk Copy** (#573)
- **Row String-Key Indexing** (#589)
- **Bundled ODBC Driver Upgrade** from 18.5.1.1 to 18.6.2.1 (#569)

### Bug Fixes
- **Deferred Connect-Attribute Use-After-Free** (#596) - Fixes #594,
#597
- **Connection String Parsed Multiple Times in Auth Path** (#590) -
Fixes #580
- **executemany Type Annotation Regression** (#586) - Fixes #572

### Version Bump
- `__version__` → 1.8.0 in `__init__.py` and `setup.py`
- `PyPI_Description.md` updated with v1.8.0 release notes
bewithgaurav added a commit that referenced this pull request Jul 9, 2026
…ld host (#661)

### Work Item / Issue Reference

> ADO:
[AB#46197](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/46197)

> GitHub Issue: #656

-------------------------------------------------------------------
### Summary

on Apple Silicon the bundled ODBC driver in the macOS wheel points at an
absolute Homebrew path (`/opt/homebrew/lib/libodbcinst.2.dylib`) instead
of the copy shipped inside the package. on a clean machine that path is
absent, so `import mssql_python` fails until `brew install unixodbc`
creates it (#656).

root cause: `configure_dylibs.sh` rewrites the bundled dylib
dependencies to `@loader_path` only for `$(uname -m)`. the wheel is
universal2 and ships both `libs/macos/arm64` and `libs/macos/x86_64`,
but the release runner is x86_64, so only the x86_64 driver got fixed.
the arm64 driver shipped with its raw Homebrew path from the driver
upgrade in #569. regressed in 1.8.0; 1.7.1 and earlier are clean.

fix:
- loop `configure_dylibs.sh` over both `arm64` and `x86_64` under
`libs/macos`, not just the build host arch. `install_name_tool` and
`codesign` both work cross-arch, so one host fixes every bundled arch.
- re-fix the committed arm64 + x86_64 dylibs to `@loader_path`.

verified both arches resolve `libodbcinst`/`libltdl` via `@loader_path`
with no absolute paths remaining, and the fixed arm64 driver dlopens
against its bundled siblings (and fails when isolated, so there is no
system fallback).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants