Hi all,

The dot commands of sqlite CLI (.dump, .import, ...) should implement a
correct exception handling.

For example: If a database file doesn't exist or the database is locked
by another sqlite process,
then sqlite returns exit code 0 and no error message. I would expect a
non-zero exit code.
But it seems that they return always 0.

Tested with sqlite 3.7.2 and 3.6.13 on Solaris 10:

# ls -l ./monitor.dbx
./monitor.dbx: No such file or directory
#  /usr/local/bin/sqlite3 ./monitor.dbx .dump > monitor.dump
# echo $?
0

and an empty database file is created, that should not be:
# ls -l ./monitor.dbx
-rw-r--r--   1 root     root           0 Nov  4 13:08 ./monitor.dbx

Functions that return always 0 are difficult to to integrate in shell
scripts ...

Regards,
 Andy von Euw

-- 
-- ========================================================== --
-- JomaSoft GmbH
-- Andreas von Euw
-- Brauerstrasse 79a, CH-9016 St. Gallen, Switzerland
-- [email protected]         http://www.jomasoft.ch
-- ========================================================== --

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to