Skip to content

[C++][FlightRPC][ODBC] Fix statement descriptor and cursor lifecycle #51341

Closed

Description

@vikrantpuppala

Describe the bug, including details regarding any error messages, version, and platform.

The Flight SQL ODBC statement implementation has several related descriptor and cursor lifecycle defects:

  • The active application row descriptor (ARD) is initialized from the built-in application parameter descriptor (APD), so the implicit ARD and APD alias each other.
  • Setting SQL_ATTR_APP_PARAM_DESC or SQL_ATTR_APP_ROW_DESC to SQL_NULL_HANDLE does not restore the corresponding implicit descriptor or detach the explicit descriptor.
  • Freeing a statement does not detach it from explicit descriptors, leaving dangling statement pointers that are dereferenced if the descriptors are freed later.
  • SQLFetch and SQLGetData without an open cursor can dereference a null result set or return the wrong diagnostic instead of SQLSTATE 24000.
  • SQLMoreResults returns SQL_NO_DATA without closing the current cursor.

These are generic framework defects and reproduce on current main.

Component(s)

C++, FlightRPC

Activity

  1. added a commit that references this issue on Sep 15, 2026
  2. added 3 commits that reference this issue on Oct 15, 2026
  3. added this to the 27.0.0 milestone on Oct 16, 2026
  4. lidavidm commented on Oct 16, 2026

    @lidavidm
    Member

    Issue resolved by pull request 51342
    #51342

  5. added a commit that references this issue on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions