How to cancel long time query in Jaybird 2.2.15 ?

11 views
Skip to first unread message

Alexander Cherepanov

unread,
Mar 27, 2022, 5:57:03 AM3/27/22
to firebird-java
Trying to use org.firebirdsql.jdbc.AbstractStatement#cancel, but INSERT query is not cancelling.

Mark Rotteveel

unread,
Mar 27, 2022, 1:15:39 PM3/27/22
to firebi...@googlegroups.com
On 27-03-2022 11:57, Alexander Cherepanov wrote:
> Trying to use org.firebirdsql.jdbc.AbstractStatement#cancel, but INSERT
> query is not cancelling.

Which Firebird version are you using? Statement cancellation only works
on Firebird 2.5 or higher.

As an aside, Jaybird 2.2 is no longer supported. The Jaybird version
that is currently supported is Jaybird 4.

Mark
--
Mark Rotteveel

Alexander Cherepanov

unread,
Mar 28, 2022, 9:38:25 AM3/28/22
to firebird-java
We use Firebird server 2.5 and long DELETE query cannot be cancelled. It is just do work until it ends.
We cannot use Jaybird 4 for now because it not fully support work with SOCKS5.

воскресенье, 27 марта 2022 г. в 22:15:39 UTC+5, ma...@lawinegevaar.nl:

Mark Rotteveel

unread,
Mar 28, 2022, 10:05:00 AM3/28/22
to firebi...@googlegroups.com
On 28-03-2022 15:38, Alexander Cherepanov wrote:
> We use Firebird server 2.5 and long DELETE query cannot be cancelled. It
> is just do work until it ends.

What is the exact version, and which server model are you using
SuperServer, Classic or SuperClassic?

Mark
--
Mark Rotteveel

Arioch The

unread,
Mar 28, 2022, 3:51:52 PM3/28/22
to firebi...@googlegroups.com
If that query is monopoly you can use old trick of abusing generators

Delete ....
Where....
  And ( gen_id(stop_signal, 0) = 0 )

пн, 28 мар. 2022 г., 16:38 Alexander Cherepanov <lanma...@gmail.com>:

Alexander Cherepanov

unread,
Mar 29, 2022, 2:36:33 AM3/29/22
to firebird-java
Thanks for the trick!

вторник, 29 марта 2022 г. в 00:51:52 UTC+5, ario...@gmail.com:
Reply all
Reply to author
Forward
0 new messages