As the title suggests, I encountered the SQL_INVALID_HANDLE error from SQLGetData function. It appears that the Driver::call function is not thread safe.
To address this issue, I attempted to add a return code in order to obtain the error code -99:
In my program, multiple threads call ODBC functions simultaneously. Therefore, I suspect that when one thread is executing SQLGetData, and another thread is creating a new session, the 'descendants' variable is not protected by thread safety measures.
As the title suggests, I encountered the SQL_INVALID_HANDLE error from SQLGetData function. It appears that the Driver::call function is not thread safe.
To address this issue, I attempted to add a return code in order to obtain the error code -99:![image](https://github.com/ClickHouse/clickhouse-odbc/assets/8033252/ca6d3a80-8e83-44cd-b2ee-7da6d5072817)
In my program, multiple threads call ODBC functions simultaneously. Therefore, I suspect that when one thread is executing SQLGetData, and another thread is creating a new session, the 'descendants' variable is not protected by thread safety measures.