Skip to content

Support for query cancelling via Statement#cancel #7

@monetdb-team

Description

@monetdb-team

Date: 2017-02-20 11:50:18 +0100
From: Manuel <>
To: clients devs <>
Version: 11.25.5 (Dec2016-SP1)
CC: martin.van.dinther

Depends on: #5
Last updated: 2017-03-02 18:35:15 +0100

Comment 25044

Date: 2017-02-20 11:50:18 +0100
From: Manuel <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Build Identifier:

Feature request: add support for query cancelling via java.sql.Statementcancel method

Reproducible: Always

Steps to Reproduce:

Using the latest version of the Monetdb jdbc driver it is not possible to cancel queries via java.sql.Statementcancel method

Actual Results:

An SqlException is thrown

Expected Results:

The statement is cancelled in both the DBMS and driver.

Comment 25091

Date: 2017-03-02 18:35:15 +0100
From: Martin van Dinther <<martin.van.dinther>>

Thanks for the request. This method is indeed not implemented in JDBC (and ODBC).

As an alternative to prevent very long running queries you can set a query timeout before executing the query. This can be done in your Java program if you can edit the sources, see http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.htmlsetQueryTimeout(int)
or via an SQL command: call sys.settimeout(bigint);

It is not the same as cancelling a running query, but it may help in some user scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions