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
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:
SQL_ATTR_APP_PARAM_DESCorSQL_ATTR_APP_ROW_DESCtoSQL_NULL_HANDLEdoes not restore the corresponding implicit descriptor or detach the explicit descriptor.SQLFetchandSQLGetDatawithout an open cursor can dereference a null result set or return the wrong diagnostic instead of SQLSTATE24000.SQLMoreResultsreturnsSQL_NO_DATAwithout closing the current cursor.These are generic framework defects and reproduce on current
main.Component(s)
C++, FlightRPC