Issue Details (XML | Word | Printable)

Key: CORE-1774
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Jesús Gálvez
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Problem with COLLATE ES_ES_CI_AI

Created: 05/Mar/08 04:29 PM   Updated: 18/Nov/08 01:07 PM
Component/s: Charsets/Collation
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1 Beta 2, 2.1 RC1, 2.5 Initial
Fix Version/s: 2.0.4, 2.5 Alpha 1

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

Environment: Windows Vista, FB Super Server

Planning Status: Unspecified

Sub-Tasks  All   Open   

 Description  « Hide
CREATE TABLE TABLE_A (
    FIELD_A VARCHAR(100) CHARACTER SET ISO8859_1 COLLATE ES_ES_CI_AI
);


INSERT INTO TABLE_A (FIELD_A) VALUES ('Hace buena noche');
INSERT INTO TABLE_A (FIELD_A) VALUES ('Voy a hacer de comer');
INSERT INTO TABLE_A (FIELD_A) VALUES ('The web is hacked');

When I run the query:

SELECT * FROM TABLE_A WHERE FIELD_A LIKE '%HACK%'

Results:
FIELD_A
Hace buen día
Voy a hacer de comer
The web is hacked

Why shows 'Hace' and 'Hacer' if I'm search for 'hack'?


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 08/Mar/08 01:17 PM
The letter "k" is incorrectly being mapped to "_" so it match any character.

This is a bug of case-/accent- insensitive collations, present in all branches since 2.0, but directly affects only (I hope) ES_ES_CI_AI of V2.0.X.

I'll commit a fix for 2.0.4 and 2.5... I can latter fix 2.1 if new RC are needed or defer to 2.1.1.

Jorge Andres Brugger added a comment - 17/Mar/08 10:32 AM
Adriano, it´s the one and only letter with this behaviour? (i.e, "mapped to _")

Adriano dos Santos Fernandes added a comment - 17/Mar/08 08:57 PM
Jorge,

All characters marked as IGNORE (i.e., the ones that with SPECIALS-FIRST=1 comes before - such as punctuations, underline and percent) are being mapped to some other character.

As such, the more problematic cases here is underline and percent, and hence the collation is very bugged.