Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API sqlcancel is not supported #422

Open
tianbeierlu opened this issue Jun 20, 2023 · 0 comments
Open

API sqlcancel is not supported #422

tianbeierlu opened this issue Jun 20, 2023 · 0 comments

Comments

@tianbeierlu
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant