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

isql under windows: different behaviour on Ctrl-BREAK depending on whether it currently performs some job or no [CORE4069] #4397

Open
firebird-automations opened this issue Mar 25, 2013 · 0 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Scenario:

SQL> create database 't1.fdb'; commit;
SQL> create table t(s blob); commit;
SQL> quit;

Window #⁠1
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠
// Connect to database via TCP
C:\MIX\firebird\fb25>isql localhost:C:\MIX\firebird\fb25\T1.FDB -n
Database: localhost:C:\MIX\firebird\fb25\T1.FDB

Window #⁠2
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠
Starting user trace session with enabled parameters:
log_connections true
log_transactions true
log_statement_start true
log_statement_finish true

Window #⁠1
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠
insert into table `t` large blob and press Ctrl-Break (*not* Ctrl-C!).

SQL> insert into t select list(f1.rdb$field_name) from rdb$fields f1,rdb$fields,rdb$fields;

The result of this action depends on when I press Ctrl-Break:
variant-1: press Ctrl-Break at the time when ISQL performs statement, i.e. do NOT wait finish of it;
variant-2: press Ctrl-Break after ISQL has finished statement and returns to prompt.

Trace for variant-1:
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

insert into t select list(f1.rdb$field_name) from rdb$fields f1,rdb$fields,rdb$fields

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN JOIN (F1 NATURAL, RDB$FIELDS NATURAL, RDB$FIELDS NATURAL)

0 records fetched

5723 ms, 1 read(s), 8120 write(s), 2165331 fetch(es), 26376 mark(s)

Table Natural Index Update Insert Delete Backout Purge Expunge

***************************************************************************************************************

RDB$FIELDS 1039419

2013-03-25T13:00:15.2960 (588:0220DEB0) ERROR AT jrd8_execute

C:\\MIX\\FIREBIRD\\FB25\\T1\.FDB \(ATT\_3, SYSDBA:NONE, NONE, TCPv4:127\.0\.0\.1\)

C:\\MIX\\firebird\\fb25\\bin\\isql\.exe:2404

335544794 : operation was cancelled

2013-03-25T13:00:15.3120 (588:0220DEB0) ROLLBACK_TRANSACTION

C:\\MIX\\FIREBIRD\\FB25\\T1\.FDB \(ATT\_3, SYSDBA:NONE, NONE, TCPv4:127\.0\.0\.1\)

C:\\MIX\\firebird\\fb25\\bin\\isql\.exe:2404

	\(TRA\_8, CONCURRENCY \| WAIT \| READ\_WRITE\)

 13 ms, 8 read\(s\), 34 write\(s\), 9141 fetch\(es\), 9132 mark\(s\)

Trace for variant-2 (when ISQL has finished statement):
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠
insert into t select list(f1.rdb$field_name) from rdb$fields f1,rdb$fields,rdb$fields

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN JOIN (F1 NATURAL, RDB$FIELDS NATURAL, RDB$FIELDS NATURAL)

0 records fetched

8156 ms, 3 read(s), 14695 write(s), 3722041 fetch(es), 46065 mark(s)

Table Natural Index Update Insert Delete Backout Purge Expunge

***************************************************************************************************************

RDB$FIELDS 1786323

T 1

2013-03-25T13:00:49.1710 (588:0220DEB0) COMMIT_TRANSACTION -- <<<<<<<<<<<<<< ??? W H Y ??? <<<<<<<<<<

C:\\MIX\\FIREBIRD\\FB25\\T1\.FDB \(ATT\_4, SYSDBA:NONE, NONE, TCPv4:127\.0\.0\.1\)

C:\\MIX\\firebird\\fb25\\bin\\isql\.exe:1740

	\(TRA\_9, CONCURRENCY \| WAIT \| READ\_WRITE\)

120 ms, 1 read\(s\), 1019 write\(s\), 1 fetch\(es\), 1 mark\(s\)

PS.
SQL> show version;
ISQL Version: WI-V2.5.3.26556 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.3.26556 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.3.26556 Firebird 2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26556 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 11.2

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

No branches or pull requests

1 participant