Last modified: 2014-04-29 02:37:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 60560 - [postgres] help message says "-" allowed in db name, but regex doesn't allow it
[postgres] help message says "-" allowed in db name, but regex doesn't allow it
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2014-01-29 03:01 UTC by Bawolff (Brian Wolff)
Modified: 2014-04-29 02:37 UTC (History)
1 user (show)

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


Description Bawolff (Brian Wolff) 2014-01-29 03:01:14 UTC
Our installer code only allows "-" in mysql db names. However the help message says its allowed for postgress.

Should double check it works in postgress ( suggests it does if it is quoted), and should either change the regex or change the help message.

See also bug 25969
Comment 1 Bawolff (Brian Wolff) 2014-01-29 23:27:12 UTC
The hard part of this bug is that someone should actually test that using a db name with a "-" in it actually works with mediawiki.
Comment 2 Jeff Janes 2014-04-29 02:37:31 UTC
After changing the regex, I installed against git HEAD with a PostgreSQL database named "my-wiki", and created and edited pages and uploaded files with no problem.  Same with "my_wiki-".

I also tried "-my_wiki", but that failed to upload files to it.  But I also tried "-my_wiki" against mysql in 1.22.6, and that too failed.

I did not test any extensions.  I assumed that all connections where directed through a single codepath, and so if it worked anywhere it would work everywhere.  But the failure to upload files to databases with leading hyphens contradicts that.  Are there specific extensions I should test?

So my conclusion is that database names with hyphens in them (no matter how unwise they may be) are supported by PostgreSQL just as much as by MySQL.

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