Fix sql.php behavior on error
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 10 Jul 2015 17:38:19 +0000 (13:38 -0400)
committerBryanDavis <bdavis@wikimedia.org>
Fri, 10 Jul 2015 17:55:44 +0000 (17:55 +0000)
commitf9b579efc6d3116cdc322a4f8c8fe05b079d9e9c
tree8b768f1bc4d08d984ddaca5e056bc9b36a2770ad
parentac75c5eb8e9356e453ad7bc1ab2537f0f27e4fb2
Fix sql.php behavior on error

When an erroneous query is entered into sql.php, it doesn't clear its
line buffer, so the intended next query (often fixing a typo in the
original) winds up concatenated onto the erroneous query. Usually
leading to another error, which repeats the process.

The solution is simple enough: clear the line buffer unconditionally,
not only when no exception is caught.

Change-Id: Ia78e2df8b9c6698c0a225bfb3135274ed8da5303
maintenance/sql.php