Last modified: 2012-10-29 08:26:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39020, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37020 - sql.php with readline eats semicolon
sql.php with readline eats semicolon
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 13:47 UTC by Antoine "hashar" Musso (WMF)
Modified: 2012-10-29 08:26 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2012-05-22 13:47:51 UTC
When running sql.php interactively and repealing a previous statement, the history line is missing the trailing semicolon (at least when using sqlite as a backend).

how to reproduce:

Launch script:
 php sql.php

Write a command and execute it by pressing enter
 SELECT * FROM job;

Script outputs:
 Query OK, 0 row(s) affected
 >

Press key up to repeal previous command. Script output should look as:

 > SELECT * FROM job;
 Query OK, 0 row(s) affected
 > SELECT * FROM job

The last line is the repealed one which is missing the semicolon.


~/.mwsql_history gives me:

select\040*\040from\040job
select\040*\040from\040jobselect\040*\040from\040job
SELECT\040*\040FROM\040job

Indeed missing the semicolon.






Cause might be commit ebf916f3fb528bba0fcb5626701815a1810463de for bug 27207
Comment 1 Antoine "hashar" Musso (WMF) 2012-10-25 11:03:06 UTC
https://gerrit.wikimedia.org/r/29952 adds the database delimiter to the readline history file.
Comment 2 Antoine "hashar" Musso (WMF) 2012-10-29 08:26:58 UTC
Merged, will be in 1.21.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links