Project

General

Profile

Actions

Bug #523

closed

Result database schema should define character set for names

Added by Evgeny Novikov over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Infrastructure
Start date:
11/03/2010
Due date:
% Done:

0%

Estimated time:
Detected in build:
a785962
Platform:
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).


Related issues 2 (0 open2 closed)

Related to Linux Driver Verification - Bug #515: Middle regression test fails!ClosedAlexandr Strakh11/01/2010

Actions
Related to Linux Driver Verification - Feature #519: Regression test script should check whether task file is correctly orderedClosedEvgeny Novikov11/02/201011/17/2010

Actions
Actions #1

Updated by Evgeny Novikov over 13 years ago

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,

Actions #2

Updated by Pavel Shved over 13 years ago

All locales, except UTF-8, are totally obsolete, lead to errors, and should not be used anymore.

Actions #3

Updated by Evgeny Novikov over 13 years ago

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).

Actions #4

Updated by Pavel Shved over 13 years ago

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.

Actions #5

Updated by Pavel Shved over 13 years ago

  • 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.

Actions #6

Updated by Evgeny Novikov over 13 years ago

  • Status changed from Resolved to Closed

It's really so.

Actions

Also available in: Atom PDF