Make sql.php exit status more informative
authorGergő Tisza <tgr.huwiki@gmail.com>
Mon, 17 Dec 2018 05:55:04 +0000 (21:55 -0800)
committerGergő Tisza <tgr.huwiki@gmail.com>
Mon, 17 Dec 2018 05:55:04 +0000 (21:55 -0800)
commit200f0ad20f48c3a4d7d6731b38a92d29cfb7d847
treefb4c4dd4f7ee847ae7dd337c51f9b8de6b6b175b
parent3f43c57024652e2a2fc718c574be327d6e8717d9
Make sql.php exit status more informative

Add a --status option which sets nonzero exit status for a query
returning or updating no rows. This is useful for shell scripts which
want to do simple existence checks (e.g. 'unless' conditions in Puppet)
or need to do a single-row change.

Change-Id: I3988c4fb24251dd8b33ac85aed9d0ae03eb0f910
maintenance/sql.php