(bug 37020) sql.php with readline eats semicolon
authorAntoine Musso <hashar@free.fr>
Thu, 25 Oct 2012 11:00:03 +0000 (13:00 +0200)
committerAntoine Musso <hashar@free.fr>
Thu, 25 Oct 2012 11:01:28 +0000 (13:01 +0200)
The database delimitor is now appended to the command before it is saved
in readline history.

Change-Id: Ie6bbac2d74e2e5df3910c5612adbd373a9c4695b

RELEASE-NOTES-1.21
maintenance/sql.php

index 8eb6a76..29bef9f 100644 (file)
@@ -48,6 +48,8 @@ production.
   compatibility. This also works with Squid in reverse-proxy mode. If you wish 
   to support Squid configured in forward-proxy mode, set 
   $wgSquidPurgeUseHostHeader to false.
+* (bug 37020) sql.php with readline eats semicolon
+
 
 === API changes in 1.21 ===
 * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt
index 04e98d9..6cbc482 100644 (file)
@@ -72,7 +72,9 @@ class MwSql extends Maintenance {
                                continue;
                        }
                        if ( $useReadline ) {
-                               readline_add_history( $wholeLine );
+                               # Delimiter is eated by streamStatementEnd, we add it
+                               # up in the history (bug 37020)
+                               readline_add_history( $wholeLine . $dbw->getDelimiter() );
                                readline_write_history( $historyFile );
                        }
                        try{