Last modified: 2013-09-25 09:46:10 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 T16931, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14931 - default database charset is not altered on creation
default database charset is not altered on creation
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.22.0
All All
: Low trivial (vote)
: ---
Assigned To: Karun
:
: 11859 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-26 07:59 UTC by josch
Modified: 2013-09-25 09:46 UTC (History)
5 users (show)

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


Attachments

Description josch 2008-07-26 07:59:58 UTC
software versions:
- mysql5
- mediawiki svn

steps to reproduce:

- do a new mediawiki install, select root as database user and choose a database charset of your choice (utf8, binary...)
- complete the installation
- look up the database default charset and observe that this is not what you specified earlier (utf8, binary...) but something like latin1_swedish_ci


the tables are created correctly though so this is only a minor bug but imho easy to fix by doing something like:

alter database wikidb default CHARACTER SET utf8 COLLATE utf8_general_ci;

after database creation (using the charset chosen earlier instead of utf8 of course) or by specifying the charset on database creation
Comment 1 OverlordQ 2008-07-26 08:51:25 UTC
More of a pedantic bug afaik since the 'order of operations' is column>table>database>server charset/collation.

connection collation goes in there somewhere too.
Comment 2 Andre Klapper 2013-01-29 21:51:26 UTC
*** Bug 11859 has been marked as a duplicate of this bug. ***
Comment 3 Ariel T. Glenn 2013-02-19 16:21:16 UTC
This is still true as of 1.21-something in git.  It affects eg the searchindex table, which does not have a character set specified at creation time, see maintenance/tables.sql for that.  Someone reloading a table via LOAD DATA INFILE will get bitten by this too, as that will check the database default iirc.
Comment 4 Karun 2013-05-24 18:30:19 UTC
I am going to start looking at what is causing this, and I plan to write a patch.
Comment 5 Karun 2013-06-10 04:20:20 UTC
I have submitted a patch for this bug. I am proposing to change the default character set to UTF8, as the sindex table cannot be in binary format, and all other tables will be set to binary when created, if the binary format is chosen in the installer.
Comment 6 Kevin Israel (PleaseStand) 2013-06-10 05:12:46 UTC
(In reply to comment #5)
> I have submitted a patch for this bug. I am proposing to change the default
> character set to UTF8, as the sindex table cannot be in binary format, and
> all
> other tables will be set to binary when created, if the binary format is
> chosen
> in the installer.

Patch is https://gerrit.wikimedia.org/r/#/c/67422/
Comment 7 Andre Klapper 2013-06-11 17:44:41 UTC
(In reply to comment #6)
> Patch is https://gerrit.wikimedia.org/r/#/c/67422/

Karun: Thanks for the patch! See http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines for how to get automatic notification in the corresponding bug report.
Comment 8 Gerrit Notification Bot 2013-09-24 16:22:51 UTC
Change 67422 merged by jenkins-bot:
MysqlInstaller: use default character set of utf8

https://gerrit.wikimedia.org/r/67422
Comment 9 Andre Klapper 2013-09-25 09:46:10 UTC
Patch got merged on 2013-09-24, hence closing as FIXED. 
Karun: Thanks again for contributing this patch!

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


Navigation
Links