On Tue, 24 Dec 2013 22:55:32 -0500, dmitry babitsky <dbab...@gmail.com> wrote:
>*bug description:* >Using PRAGMA busy_timeout outputs the value which in case of html output >screws up the display. >To be more precise, it creates an extra row/recordset with the timeout >value, which is what then shows on the html page. > >There should be a way to say "set the pragma, but don't output it". >It is especially important for -html mode which is designed for end-user >consumption. >What's more, it's very difficult to grep away as you can see. > >*To replicate:* > >echo "create table foo as select 1 as c;select * from foo;" |sqlite -html >-header -cmd "PRAGMA busy_timeout =1000;" :memory: >*<TR><TH>timeout</TH>* >*</TR>* >*<TR><TD>1000</TD>* >*</TR>* ><TR><TH>c</TH> ></TR> ><TR><TD>1</TD> ></TR> Although it would be nice to have that PRAGMA output suppressed, there is an easy workaround (oneliner wrapped by mail) : printf ".output stderr\nPRAGMA busy_timeout =1000;\n.output stdout\ncreate table foo as select 1 as c;select * from foo;" |sqlite3 2>/dev/null -html -header :memory: yields: <TR><TH>c</TH> </TR> <TR><TD>1</TD> </TR> -- Groet, Cordialement, Pozdrawiam, Regards, Kees Nuyt _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users