API sqlcancel is not supported
tianbeierlu opened this issue · comments
luban commented
To kill a slow query through the ODBC interface, we can normally use "sqlcancel". However, "clickhouse-odbc" does not implement this function, and there will be no response after calling this interface. Therefore, the only way to kill the slow query is through "kill query" in "clickhouse-server". the mysql odbc and oracle odbc all works.
SQLRETURN SQL_API EXPORTED_FUNCTION(SQLCancel)(
SQLHSTMT StatementHandle
) {
auto func = [&] (Statement & statement) {
statement.closeCursor();
return SQL_SUCCESS;
};
return CALL_WITH_TYPED_HANDLE(SQL_HANDLE_STMT, StatementHandle, func);
}
from odbc.cpp,we find the sqlcancel API,it only works when cursor happend.