alter sql.php prompt on line continuation
authorAntoine Musso <hashar@free.fr>
Thu, 25 Oct 2012 11:03:59 +0000 (13:03 +0200)
committerAntoine Musso <hashar@free.fr>
Thu, 25 Oct 2012 11:03:59 +0000 (13:03 +0200)
commitb1a524fddcc486c22513589c26bfd43beee83fc1
treecf5648472759d6a1599860d73504766113197efa
parent49de213dc17cd5893cd8ab3c683adc3e52abf98b
alter sql.php prompt on line continuation

As long as a command is not ended with a database delimiter, sql.php
kept appending the line without noticing the users. That is a bit
confusing since you might not even know what you are going to run when
entering the delimiter.

This patch alter the prompt to '    ->' until the command is finished.
That is more in line with how MySQL cli handles it.

Example:
$ php sql.php
> SELECT
-> *
-> from
-> job;
Query OK, 0 row(s) affected
// repeal command:
> SELECT * from job

Change-Id: Ic18b39d75d4db48d37d485e66f36d691e95934fb
maintenance/sql.php