Subject | RE: [firebird-support] Strange problem with Firebird 2.1.1 and collations with specific locales (Full ICU libraries) |
---|---|
Author | Svend Meyland Nicolaisen |
Post date | 2008-12-08T17:23:35Z |
Hello again
I have tested with the following other locales: en_UK, de_DE, ru_RU, fr_FR,
nn_NO, fi_FI and se_SE. And only the Nordic locales (nn_NO, fi_FI & se_SE)
seems to fail. There might o of course be other locales that have similar
problems. No I am wondering whether the problem relates to Firebird or the
ICU libraries?
Kind regards
Svend
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svend Meyland
Nicolaisen
Sent: Monday, December 08, 2008 5:48 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Strange problem with Firebird 2.1.1 and
collations with specific locales (Full ICU libraries)
Hello
I am running Firebird 2.1.1 with the complete version of the ICU libraries
and a strange problem has appeared. It is very simple for me to recreate
the problem as follows:
SET UTF8;
CREATE COLLATION MyCollation FOR UTF8 FROM UNICODE CASE INSENSITIVE
'LOCALE=da_DK';
CREATE TABLE MyTable (Deleted SMALLINT,Name VARCHAR(30) COLLATE
MyCollation);
CREATE INDEX MyIndex ON MyTable (Deleted,Name);
COMMIT;
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Anders');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Brian');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Carl');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Doris');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Eric');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Flemming');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'George');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Hans');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Inger');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Jens');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Klaus');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Lars');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Mikkel');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Niels');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Ove');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Paul');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Q');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Rasmus');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Svend');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Torben');
COMMIT;
Now the following queries gives the expected results:
SELECT * FROM MyTable WHERE Name STARTING WITH 'A' COLLATE MyCollation;
SELECT * FROM MyTable WHERE Name STARTING WITH 'An' COLLATE MyCollation AND
DELETED=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'S' COLLATE MyCollation;
SELECT * FROM MyTable WHERE Name STARTING WITH 'S' COLLATE MyCollation AND
DELETED=0;
But the following query returns no rows at all:
SELECT * FROM MyTable WHERE Name STARTING WITH 'A' COLLATE MyCollation AND
Deleted=0;
Other queries that fail by returning no rows are:
SELECT * FROM MyTable WHERE Name STARTING WITH 'E' COLLATE MyCollation AND
Deleted=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'O' COLLATE MyCollation AND
Deleted=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'U' COLLATE MyCollation AND
Deleted=0;
As you can see I am using a collation with "custom locale" and the problem
only appears when indexes are used.
Can anybody explain why these queries fails to return any rows? Or should I
post my question in the developer forum?
I am running Firebird version 2.1.1.17910 and the full ICU libraries version
3.0.0.0 on Windows XP. The same problem appears on Windows 2003 Server.
Kind regards
Svend Nicolaisen
[Non-text portions of this message have been removed]
I have tested with the following other locales: en_UK, de_DE, ru_RU, fr_FR,
nn_NO, fi_FI and se_SE. And only the Nordic locales (nn_NO, fi_FI & se_SE)
seems to fail. There might o of course be other locales that have similar
problems. No I am wondering whether the problem relates to Firebird or the
ICU libraries?
Kind regards
Svend
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svend Meyland
Nicolaisen
Sent: Monday, December 08, 2008 5:48 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Strange problem with Firebird 2.1.1 and
collations with specific locales (Full ICU libraries)
Hello
I am running Firebird 2.1.1 with the complete version of the ICU libraries
and a strange problem has appeared. It is very simple for me to recreate
the problem as follows:
>isql -ch utf-8CREATE DATABASE 'localhost:C:\Databases\MyDatabase.fdb' DEFAULT CHARACTER
SET UTF8;
CREATE COLLATION MyCollation FOR UTF8 FROM UNICODE CASE INSENSITIVE
'LOCALE=da_DK';
CREATE TABLE MyTable (Deleted SMALLINT,Name VARCHAR(30) COLLATE
MyCollation);
CREATE INDEX MyIndex ON MyTable (Deleted,Name);
COMMIT;
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Anders');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Brian');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Carl');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Doris');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Eric');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Flemming');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'George');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Hans');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Inger');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Jens');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Klaus');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Lars');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Mikkel');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Niels');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Ove');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Paul');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Q');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Rasmus');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Svend');
INSERT INTO MyTable(Deleted,Name) VALUES(0,'Torben');
COMMIT;
Now the following queries gives the expected results:
SELECT * FROM MyTable WHERE Name STARTING WITH 'A' COLLATE MyCollation;
SELECT * FROM MyTable WHERE Name STARTING WITH 'An' COLLATE MyCollation AND
DELETED=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'S' COLLATE MyCollation;
SELECT * FROM MyTable WHERE Name STARTING WITH 'S' COLLATE MyCollation AND
DELETED=0;
But the following query returns no rows at all:
SELECT * FROM MyTable WHERE Name STARTING WITH 'A' COLLATE MyCollation AND
Deleted=0;
Other queries that fail by returning no rows are:
SELECT * FROM MyTable WHERE Name STARTING WITH 'E' COLLATE MyCollation AND
Deleted=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'O' COLLATE MyCollation AND
Deleted=0;
SELECT * FROM MyTable WHERE Name STARTING WITH 'U' COLLATE MyCollation AND
Deleted=0;
As you can see I am using a collation with "custom locale" and the problem
only appears when indexes are used.
Can anybody explain why these queries fails to return any rows? Or should I
post my question in the developer forum?
I am running Firebird version 2.1.1.17910 and the full ICU libraries version
3.0.0.0 on Windows XP. The same problem appears on Windows 2003 Server.
Kind regards
Svend Nicolaisen
[Non-text portions of this message have been removed]