Issue Details (XML | Word | Printable)

Key: CORE-2912
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Mathias MOLLON
Votes: 1
Watchers: 4
Operations

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

Exception when upper casing string with lowercase y trema (code 0xFF in ISO8859_1 )

Created: 08/Mar/10 11:26 AM   Updated: 25/Sep/15 12:55 PM
Component/s: Charsets/Collation
Affects Version/s: 2.1.3
Fix Version/s: 3.0 Alpha 1, 2.1.6, 2.5.3

Environment: Windows Xp,visat with Flamerobin
Issue Links:
Relate

QA Status: Done successfully


 Description  « Hide
Database open with FlameRobin with :
DIALECT=3
ISO8859_1
Database create with DEFAULTCHARSET=ISO8859_1

with Firebird 2.1.1 et 2.1.2
SELECT UPPER('ÿ') FROM TABLE --> OK
SELECT a.lib FROM TGROUPES a where lib containing 'Faÿ' ---> OK

with Firebird 2.1.3 and 2.1.4
SELECT UPPER('ÿ') FROM TABLE--> arithmetic exception, numeric overflow, or string truncation
SELECT a.lib FROM TGROUPES a where lib containing 'Faÿ' --> arithmetic exception, numeric overflow, or string truncation
by cons it works well with :
SELECT a.lib FROM TGROUPES a where lib STARTING With 'Faÿ' ---> OK
SELECT a.lib FROM TGROUPES a where lib LIKE 'Faÿ%' ---> OK

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 08/Mar/10 11:16 PM
ISO8859_1 does not contains the LATIN CAPITAL LETTER Y WITH DIAERESIS (U+0178). So how could it work?

This is needed for UPPER, and indirectly for CONTAINING too.

Mathias MOLLON added a comment - 09/Mar/10 10:02 AM
You are right, but the functions (UPPER and CONTAINING) should not crash.
With Firebird 2.11, the string contaning lowercase y with diaeresis is not processed by UPPER function (the result string is identical to the original string) but it doesn't crash.
The best compromise for UPPER(ÿ) would be to get CAPITAL Y without diaeresis.

Adriano dos Santos Fernandes added a comment - 09/Mar/10 10:39 AM
What is a "crash"?

Adriano dos Santos Fernandes added a comment - 09/Mar/10 10:41 AM
v2.1 is not correct. Try this: upper('aÿb') -> Aÿb

The function stops on ÿ and do not uppercase b.

Mathias MOLLON added a comment - 09/Mar/10 11:03 AM
Q :What is a "crash"

R :
upper('aÿb')
with 2.1.3 :--> arithmetic exception, numeric overflow, or string truncation

Karsten Rolfs added a comment - 01/Nov/10 12:18 PM
This error also affect computed keys and version 2.5 (Build 26074).

If a field contains a 'ÿ' and an index for a case-independent search should be created by:
CREATE INDEX INDEXNAME_U ON TESTTABLE COMPUTED BY (UPPER (TESTFIELD COLLATE ISO8859_1));

the error 'key size exceeds implementation restriction for index ... ' was thrown.

Siva Ramanathan added a comment - 21/Jul/11 04:16 PM
This problem is present in Firebird 2.5 as well. This seems to be important to fix.