Skip to content

Fix ODBC consumer compatibility and coverage - #694

Merged
Shfdis merged 26 commits into
odbc-driver-featurefrom
fix/odbc-consumer-gaps
Nov 13, 2026
Merged

Shfdis merged 26 commits into
odbc-driver-featurefrom
fix/odbc-consumer-gaps

Conversation

@Shfdis

@Shfdis Shfdis commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Fix ODBC metadata, value binding, chunked fetching and affected-row reporting. Add legacy statement allocation for unixODBC cursor-library compatibility.

Restore applicable consumer tests with YDB fixtures while keeping consumer implementations unchanged. Document reproduced upstream defects and unsupported behavior with exact exceptions.

@Shfdis

Shfdis commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T18:03:27.398211Z c043ed8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

ODBC integration report

✨ Open the interactive Allure report · 📦 Download the report bundle

Commit: c2450c3e94bac29e854aa63c83529476eebad16a; result: success; updated by each run.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ea2747613

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread odbc/src/statement.cpp Resolved
github-actions Bot added a commit that referenced this pull request Nov 11, 2026
github-actions Bot added a commit that referenced this pull request Nov 11, 2026
github-actions Bot added a commit that referenced this pull request Nov 11, 2026

Shfdis commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed both in c161059: reject parameter counts and $pN indices above 32767 with HY000; correct the in-memory static-cursor description.

github-actions Bot added a commit that referenced this pull request Nov 11, 2026
github-actions Bot added a commit that referenced this pull request Nov 11, 2026
@Shfdis

Shfdis commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: c043ed83d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

github-actions Bot added a commit that referenced this pull request Nov 11, 2026
github-actions Bot added a commit that referenced this pull request Nov 11, 2026

@robot-vibe-db robot-vibe-db Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review Summary

Verdict: ✅ No Critical or Major issues found

Critical and Major issues

No Critical or Major issues found.

Other findings

  • Minor | Medium: Datetime64 is missing from the wide-temporal detection in MakeColumnMeta, so probe failures for Datetime64 params still surface as HYC00 — odbc/src/utils/cursor.cpp:20
  • Minor | Medium: SQLNativeSql under AnsiSQL=1 now returns the injected --!ansi_lexer/PRAGMA UnicodeLiterals; prefix as part of the native string, an undocumented contract change — odbc/src/connection.cpp:394
  • Minor | Medium: descriptor SQL_DESC_DISPLAY_SIZE computation lacks the unsigned (+1 digit) adjustment applied in the SQLColAttribute path — odbc/src/descriptor.cpp:176
  • Minor | Medium: string lengths outside 0–32767 now fail with HY000 "Too many parameters (maximum 32767)" instead of the previous behavior; length_error is caught and mapped to a generic diagnostic — odbc/src/utils/escape.cpp:364
  • Minor | Medium: SQLSpecialColumns now discards all identifier rows when any primary-key column is missing or disallowed, instead of skipping only that column — odbc/src/statement_metadata.cpp:578
  • Minor | Medium: no driver-level integration test exercises AnsiSQL=1 / PrepareSql against a live server — odbc/src/connection.cpp:385
  • Minor | Low: value overflows inside ExecuteMulti accumulate SQL_SUCCESS silently, so a truncated total can mask per-set failures that reported SQL_SUCCESS_WITH_INFO — odbc/src/statement.cpp:267
  • Minor | Low: ExtractAffectedRows's internal-index detection relies on a '/'-in-table-name prefix heuristic and may misclassify user tables whose names are dotted prefixes of other accessed tables — odbc/src/statement.cpp:39
  • Minor | Low: SQLGetFunctions advertises every ordinal in the ODBC 3.x ranges (1001–1021), including functions the driver does not export (e.g. SQLBrowseConnect at 1005) — odbc/src/metadata.cpp:134
  • Minor | Low: SQLGetFunctions continues to advertise legacy ODBC 2.x ordinal 6 (SQLColAttributes) alongside the 3.x name — odbc/src/metadata.cpp:134
  • Nit | High: nanosecond fractions not divisible by 1000 are rejected with 22007; microsecond truncation would be friendlier — odbc/src/utils/convert.cpp:321
  • Nit | Low: GetCursorName fabricates SQL_CUR<address>, which is nondeterministic across runs — odbc/src/statement.cpp:998

This review was generated automatically. Critical and Major issues require attention; Minor and Nit findings are advisory.
If this comment was useful, please give it a 👍 — it helps us improve the review bot.

Comment thread odbc/src/utils/cursor.cpp Resolved
Comment thread odbc/src/connection.cpp Resolved
Comment thread odbc/src/descriptor.cpp Resolved
Comment thread odbc/src/utils/escape.cpp Resolved
Comment thread odbc/src/statement_metadata.cpp Resolved
Comment thread odbc/src/statement.cpp Resolved
Comment thread odbc/src/metadata.cpp Resolved
Comment thread odbc/src/metadata.cpp Resolved
Comment thread odbc/src/utils/convert.cpp Resolved
Comment thread odbc/src/statement.cpp Resolved
@robot-vibe-db

robot-vibe-db Bot commented Nov 11, 2026

Copy link
Copy Markdown

Finding outside the inline diff

odbc/src/statement.cpp:267

Severity: Minor
Confidence: Low

When ExecuteMulti's accumulated RowCount_ overflows mid-loop, the code sets rowCountUsable = false and keeps returning SQL_SUCCESS for the remaining sets, so a silently truncated row count can mask a per-set SQL_SUCCESS_WITH_INFO result that was previously folded into the return code. ODBC's contract here is murky (SQLRowCount may be unknown after partial failures), but leaving the final return as plain SQL_SUCCESS while the reported count is disabled is worth revisiting.

Consider returning SQL_SUCCESS_WITH_INFO with a diagnostic noting the row count is unavailable when rowCountUsable is disabled.

github-actions Bot added a commit that referenced this pull request Nov 11, 2026

Shfdis commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

On row-count overflow: rowCountUsable only controls the total. Per-set SQL_SUCCESS_WITH_INFO is propagated separately; overflow yields SQLRowCount = -1. No warning is lost.

github-actions Bot added a commit that referenced this pull request Nov 12, 2026
github-actions Bot added a commit that referenced this pull request Nov 12, 2026
github-actions Bot added a commit that referenced this pull request Nov 12, 2026
@Shfdis
Shfdis merged commit c2450c3 into odbc-driver-feature Nov 13, 2026
25 checks passed
github-actions Bot added a commit that referenced this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant