This error occurs in 3.8.6:
$ echo 'foo' > /tmp/foo.sql
$ sqlite3 /tmp/foo.db < /tmp/foo.sql
Error: incomplete SQL: foo
$ echo $?
0
0 is the return code from sqlite3 and this should instead return 1 since
an error occured.
shell.c:3644
============
if( nSql ){
if( !_all_whitespace(zSql) ){
fprintf(stderr, "Error: incomplete SQL: %s\n", zSql);
}
free(zSql);
}
free(zLine);
return errCnt>0;
==============
I think there should be a errCnt++; after the fprintf statement.
I recompiled with this statement. It now returns 1 back to the OS.
See also:
http://stackoverflow.com/questions/26286104/sqlite3-command-line-inconsistent-return-codes
Thanks,
-John
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users