crash icon indicating copy to clipboard operation
crash copied to clipboard

How to cancel long lasting SELECTs?

Open githubmui opened this issue 10 years ago • 7 comments

Hi, it tried to quit a long lasting SELECT with Ctrl-C or Ctrl-Break. My current CRASH version 0.16.0 quit not only the SELECT but also itself. Maybe this is a bug or is there eventually a shortcut to quit only the SELECT? BTW: If the SELECT is finished then Ctrl-C doesn't break the shell.

githubmui avatar Mar 29 '16 18:03 githubmui

Ctrl-C should only interrupt the SELECT - however it does not KILL the query! This has been implemented recently and is in 0.16.0 https://github.com/crate/crash/commit/b546babaf9a3b48f7f4df9834d18f40f23d17dee Ctlr-D quits the crash

What operating system and Python version do you use?

chaudum avatar Mar 30 '16 08:03 chaudum

Hi, my Python version is 3.5.1 and I tested it on windows.

githubmui avatar Mar 30 '16 08:03 githubmui

@githubmui thanks, we'll have a look!

chaudum avatar Mar 30 '16 10:03 chaudum

Hi @githubmui. I have tested it with your specs on a windows 8 and 10 machine and it works fine there (see screen). Did you try it the same as I did? So as @chaudum said Ctrl-C will only interrupt the shell input command. If you want to kill the job its necessary to run KILL ALL or KILL <job_id> (see https://crate.io/docs/reference/sql/reference/kill.html). Hope I could help. capture

mikethebeer avatar Mar 31 '16 08:03 mikethebeer

I tested with a simple table with three columns (string, integer and timestamp) and no primary key. The table has got thousend of rows. Then I did a SELECT * from TABLE_NAME and the rows were scrolling over the screen. While scrolling, I pressed CTRL-C and the SELECT statement were broken and also the crash shell itself.

githubmui avatar Mar 31 '16 15:03 githubmui

Hi @githubmui, thanks, I was able to reproduce it. We have already a fix for it in master branch. It will be also fixed in the next feature release.

mikethebeer avatar Apr 01 '16 10:04 mikethebeer

Thx!

githubmui avatar Apr 01 '16 15:04 githubmui