SQLite Forum

Strange CLI .exit issue
Login
The problem I reported is both accurate and real.  The setup using FTYPE is also 100% correct as is.  It expands to a new CMD running the command:

`type sample.sql | c:\bins\sqlite3 --batch`

I won't dignify bad-tempered/rude, and above all WRONG answers with a reply.  (This is, unfortunately, a recurrent theme in this forum by various members.)

The proposed change I posted I have already tried and it appears to have solved the problem in my limited testing.  I'm just not sure if it's correct in the sense it does not have ill side-effects as I don't know SQLite3 source.

What it does (or rather, should do, if there are no side bugs), is simply consume all chars until end-of-file upon `.exit` command.

I did not ask for an opinion on the correctness of my setup, only of the 'fix'.

If one can't see the problem in the original - that TYPE feeds SQLite3 with data after SQLite3 has stopped running - I can't help.  It's not SQLite3's problem per se (so technically not a bug) as Windows could stop feeding a dead process data, but if it can be solved from within SQLite3 very simply, why not?