allow cli scripts to be interrupted with ctrl-c and still display their output
Also: fix 2 queries for checking schema validity (would not run on all mysql versions)
Also: fix 2 queries for checking schema validity (would not run on all mysql versions)