You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][FlightRPC] [ODBC] - SQLCancel does not post a diagnostic record on failure #55816
SQLCancel currently wraps the call in a bare try/catch and returns SQL_ERROR without posting anything to the statement's Diagnostics, so SQLGetDiagRec/SQLGetDiagField return nothing useful after a failed cancel.
Per the ODBC spec, when SQLCancel cancels a function running on another thread (our primary use case — interrupting a blocked SQLFetch from another thread), no diagnostic information is required. But for other failure cases (e.g. a genuine internal error), the spec expects a diagnostic record with an appropriate SQLSTATE (HY000, HY001, etc.).
SQLCancel was deliberately implemented without ExecuteWithDiagnostics (see dremio/arrow#167) to avoid lock contention and a shared-diagnostics race with an in-progress SQLFetch. Implementing proper diagnostics here needs a way to post to Diagnostics that's safe to call concurrently with the statement's normal diagnostics usage, without reintroducing that same lock contention.
Activity