- Package:
- mysql-server
- Source:
- mysql-8.0
- Submitter:
- Bernd Eckenfels
- Date:
- 2013-09-26 09:09:14 UTC
- Severity:
- minor
after installing the server, the default charset is latin1 (which is more or less ok on a lot of systems, however I think it should be a debconf question). For example latin9 or utf8 are often requested, too. I also think that latin1_swedish_ci is a pretty bad default colaltion for latin1. I would sugegst to use the bin collation or always ask for it. I think the collation is not so critical, since it can be changed, but for the charset a question before the DB is created is usefull. Gruss Bernd
Hello Bernd No, I would consider this as abuse of Debconf; when I start asking the default locale, 100 other equally important things come to my mind and I would have to start deciding which ones to ask and which not :) Things like "should the server be started" or "should the db be purged after removing" which are needed by the Debian scripts are proper things to ask via Debconf only. Collation is the definition in which order to sort characters, right? What's the difference between the both and which are the relevant config options? Try "ALTER TABLE xyz CHARSET utf8;"? bye,
In that case please use the systems default locale, not any aribitary (wrong) one. That does not change the database' default charset or collation. I am not sure if that is possible? Bernd
found 321505 mysql-server-4.1 found 321505 mysql-server-5.0 tags 321505 + wontfix thanks Hello Bernd I've just read the documentation about MySQL collates. There are some points which speak against changing the current default: - MySQL does not have a collation for every possible locale and for some, like German, there exists even more than one possibilities. So chosing the right one is difficult and would require some explanation if done manually. - Automatically deciding which is the right one, may be impossible as "root" often has set LC_ALL=C. - It would differ from all other distributions and the existing behaviour so might break applicatins which expect it the way it currently is. - It's no big deal as you can change the charset and collation server-wide vi /etc/mysql/my.cnf or with SQL commands for databases, tables, single columns and even for individual SELECTs. I leave this report open, tagged as "wontfix", for reference. bye,
I know that 4.1 has the alter table, it has it not for 4.0. what happens if you change the charset for tables which have already data in it, will it be converted? Well, I agree with the wontfix, perhaps an upstream report would be good, because for example there is no latin9 (iso-8859-15) charset which contains euro. Greetings Bernd
Hello Bernd
I don't think that there's a need for convertion. In you case it would still
be charset "latin1" but a different collation ("latin1_german1_ci" instead of
"latin1_swedish_ci"). A collation though is only a rule that gets
applied but no change in the binary representation. Given this, yes, altering
the table affectes everything that has been stored in it before (I tried it).
Yes, feel free to file a bug at dev.mysql.com. Regarding the Euro sign, latin1
is at least capable of storing it. Using ord() you can even see that latin1 is
in fact latin9 :-) (well, that's stricty spoken a bug for itself in case
anybody needs the "currency sign" :-))
bye,
Hello, I really don't understand why latin1_swedish_ci is used as default instead of latin1_general_ci which is "general" as its name says...
Backwards compatibility with older mysql versions. bye,
If you need fix this bug for many comps use bugfix-321505 package in https://launchpad.net/~ivan1986/+archive/ppa it's only put mysqld_charset.cnf in /etc/mysql/conf.d/ whis [mysqld] character-set-server = utf8 [mysql] default-character-set=utf8