Last modified: 2014-11-20 20:18:44 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 T75595, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73595 - sql script does not accept wildcards as parameter
sql script does not accept wildcards as parameter
Status: UNCONFIRMED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized minor
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-19 03:59 UTC by Diego Queiroz
Modified: 2014-11-20 20:18 UTC (History)
3 users (show)

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


Attachments
New version of the /usr/bin/sql file (3.09 KB, application/octet-stream)
2014-11-19 03:59 UTC, Diego Queiroz
Details

Description Diego Queiroz 2014-11-19 03:59:38 UTC
Created attachment 17169 [details]
New version of the /usr/bin/sql file

Currently, if we use a database not described in /usr/bin/sql script (like "ptwiki"), the script calls itself in a way that prevents the use of wildcards (*) as parameter.

So running queries like

  sql ptwiki 'select * from revision limit 1'

does not work, while

  sql ptwiki_p 'select * from revision limit 1'
  sql ptwiki 'select rev_id from revision limit 1'

work.

I made some changes to the file, and attached to this bug.  I think it is safe to replace it.

This new version solves the problem (changing ${*:2} to "${@:2}" is enough), but also allows the user to pass filenames as parameter.

So

  sql ptwiki 'filename.sql'

will also work.

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


Navigation
Links