Last modified: 2008-06-09 21:45:35 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 T13084, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11084 - Table prefix should be added to table names with uppercase characters
Table prefix should be added to table names with uppercase characters
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.11.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links