Bug #523
closed
Result database schema should define character set for names
Added by Evgeny Novikov about 14 years ago.
Updated almost 14 years ago.
Detected in build:
a785962
Published in build:
24fa428
Description
We have noticed some strange behavior (see bug #519). Indeed it's shortcoming of the current database schema character set that prevent results from correct ordering. One example that in the default charset 'utf8' the symbol '_' is less than '.'! This isn't very critical for almost all operations with database but leads to fails for task where the correct ordering is important.
In correspondence with the manual http://dev.mysql.com/doc/refman/5.0/en/charset-column.html and colleague advice I suppose that we've to write instead of
create table drivers (
id int(10) unsigned not null auto_increment,
name varchar(255) not null,
something like this:
create table drivers (
id int(10) unsigned character set latin1 collate latin1_bin not null auto_increment,
name varchar(255) not null,
At the moment this doesn't allow to finish task with regression tests (see Bug
#515).
Sorry! The correct variant is:
create table drivers (
id int(10) unsigned not null auto_increment,
name varchar(255) character set latin1 collate latin1_bin not null,
All locales, except UTF-8, are totally obsolete, lead to errors, and should not be used anymore.
If so then another general solution is needed. Or we'll encounter a lot of ambiguous bugs in stats server, ldv-online, regression tests and another programs that are (will be) based on the database having 'default' character set ('utf8' isn't specified also and it is taken from local mysql configuration file).
Eugene Novikov wrote:
programs ... based on the database having 'default' character set
No, that's not true. No programs should be based on ordering records of records in the results of database requests. If programs are "based on" that, then these programs contain a bug.
For example, before taking a diff between files with anticipated and calculated test results, they both should be sorted on the user's machine using same locales. That's all what it takes. Database collation has nothing to do with that.
- Status changed from New to Resolved
- Published in build set to 24fa428
I thought that utf8 is the default charset, but apparently some Linux distributions change it. The 24fa428 sets UTF8 as charset for all tables.
Most likely, no migrations will be necessary.
- Status changed from Resolved to Closed
Also available in: Atom
PDF