Skip to content

Prevent tests from failing with FreeTDS#1473

Merged
mkleehammer merged 3 commits into
mkleehammer:masterfrom
bkline:1471-freetds
Jun 4, 2026
Merged

Prevent tests from failing with FreeTDS#1473
mkleehammer merged 3 commits into
mkleehammer:masterfrom
bkline:1471-freetds

Conversation

@bkline

@bkline bkline commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Some tests have been tweaked, others skipped.

Also fixes a typo in string used to detect the FreeTDS drier.

Closes #1471

Some tests have been tweaked, others skipped.

Also fixes a typo in string used to detect the FreeTDS drier.

Closes mkleehammer#1471
@mkleehammer

Copy link
Copy Markdown
Owner

I verified this under FreeTDS locally -- version 1.3.17 (what Ubuntu 24.04 ships), against SQL Server 2022. On master the detection typo means none of the FreeTDS skips fire, and the suite segfaults at test_cursor_messages_with_fast_executemany. With this PR the detection is fixed (tdsodbc now matches the libtdsodbc.so driver name), the version gates all fire, and the crash is gone -- the suite goes from a hard crash to 91 passed, 7 skipped.

Two notes:

  1. The rename needs a rebase. IS_FREEDTS became IS_FREETDS, but since this PR was opened master picked up another IS_FREEDTS use (in test_tvp_with_nulls, from Avoid heap corruption with NULLs in TVPs (#1450) #1452), and Fix .statistics() issue with Unicode table names #1460 is about to add one more (test_statistics_unicode). Those aren't in this diff, so as-is the merge leaves a dangling IS_FREEDTS and a NameError on import. I'll rebase and finish the rename across all of them.

  2. On 1.3.17 one failure remains -- test_context_manager_failure -- but it passes in isolation, so it's a cascade from the FreeTDS "COMMIT with no BEGIN" bug (dataSources() DSN truncation #718) landing on a different test than the conn2 workaround anticipated. The version gates here target 1.5.x, so 1.3.17 is likely just below the floor you validated against -- flagging it in case you want to widen the workaround or document a minimum FreeTDS version.

Thanks @bkline -- big improvement.

@mkleehammer mkleehammer merged commit b668b2f into mkleehammer:master Jun 4, 2026
9 of 10 checks passed
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.

Tests fail when using the FreeTDS driver

2 participants