sql - sqlite3 command line inconsistent return codes -
sql - sqlite3 command line inconsistent return codes -
i cannot find documentation anywhere on net homecoming codes sqlite3 command line program.
trying utilize programmatically, i've found errors print screen still homecoming zero. example, returns error message "error: incomplete sql" not cause command line application homecoming nonzero:
$ echo 'foo' > /tmp/foo.sql $ sqlite3 /tmp/foo.db < /tmp/foo.sql error: incomplete sql: foo $ echo $? 0
is bug? think so, particularly given equivalent line:
$ sqlite3 /tmp/foo.db "foo" -- loading resources /home/yomomma/.sqliterc error: near "foo": syntax error $ echo $? 1
can point me documentation on expected homecoming values sqlite3?
(the problem not .sqliterc, reproduced in total here:
.mode column .headers on .nullvalue '<null!>'
)
edit:
$ sqlite3 --version -- loading resources /home/yomomma/.sqliterc 3.7.13 2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc
this bug in sqlite (v3.8.6). looking @ shell.c:3644
if( nsql ){ if( !_all_whitespace(zsql) ){ fprintf(stderr, "error: incomplete sql: %s\n", zsql); } free(zsql); } free(zline); homecoming errcnt>0;
i think there should errcnt++;
after fprintf statement. increment operation used before in code after detecting type of error. study author.
sql sqlite sqlite3 debian return-value
Comments
Post a Comment