Last modified: 2008-06-09 21:45:35 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 11084 - Table prefix should be added to table names with uppercase characters
Table prefix should be added to table names with uppercase characters
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-08-27 19:01 UTC by Robbie Haertel
Modified: 2008-06-09 21:45 UTC (History)
1 user (show)

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


Description Robbie Haertel 2007-08-27 19:01:28 UTC
Currently, the replaceVars function in Database.php (used to replace variables in sourced SQL) only allows $wgDBprefix to be attached to tables with all lowercase names. This follows from the regular expression on line 2268 of Revision 25203 (last changed revision of Database.php is 24969):

$ins = preg_replace_callback( '/\/\*(?:\$wgDBprefix|_)\*\/([a-z_]*)/',

I request that uppercase characters be allowed in table names added by extensions(please let me know if there is a strict policy prohibiting this from MediaWiki extensions like my own):

$ins = preg_replace_callback( '/\/\*(?:\$wgDBprefix|_)\*\/([a-zA-Z_]*)/',
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-08-27 19:03:27 UTC
This is a bug.
Comment 2 Brion Vibber 2007-08-27 19:06:47 UTC
I would *very* strongly discourage non-lowercase table names, as behavior with respect to case-sensitivity and preservation is dependent on operating system behavior.

Should still fix the regex. :) Consider that other chars may be used as well, though.
Comment 3 Brion Vibber 2008-06-09 21:45:35 UTC
Added A-Z0-9 in r36108

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