SQLite Forum

New Caveat (bug?) Interrupt does not Interrupt during Columnar output
Login

New Caveat (bug?) Interrupt does not Interrupt during Columnar output

(1) By Keith Medcalf (kmedcalf) on 2020-06-15 18:26:36 [source]

An observation, at least on Windows. Because the CLI columnar output functions have to read the entire query result before generating output to the console/stdout, you can no longer "interrupt" a query while the output is rendering -- the signal handler only interrupts the query execution but the query execution is already complete by the time the output starts.

This means that, for example, if the table t1 contains 1 million rows, in .mode list you can interrupt with ^C (SIGINT) after seeing the first few scroll on the screen. However, in .mode box or other columnar output format in which the query must have run to completion before output is produced, you can no longer interrupt the output.

(2) By TripeHound on 2020-06-15 21:18:47 in reply to 1 [link] [source]

Looks like Richard has now fixed this. Works for me, anyway.

(3) By Keith Medcalf (kmedcalf) on 2020-06-15 22:02:21 in reply to 2 [link] [source]

Yup, works for me too. I figured Richard would know exactly where to fix this.

The only other possible change is that the output now interrupts inside a "column" rather than after a "row" ... while this is neither really here nor there, it would make the output break "prettier" if it was only checked for at the end of a row rather than each column (thus putting the command prompt back at the left margin instead of inline).

Nit picky I know, however ...