Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when upper casing string with lowercase y trema (code 0xFF in ISO8859_1 ) [CORE2912] #3296

Closed
firebird-issue-importer opened this issue Mar 8, 2010 · 14 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Mar 8, 2010

Submitted by: Mathias MOLLON (mmollon)

Relate to CORE4123
Is related to CORE1431
Is related to QA599

Votes: 1

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

Commits: bf70f3f 3cc2513 91b8169 7232eff FirebirdSQL/fbt-repository@bc89d36 FirebirdSQL/fbt-repository@a0f16eb FirebirdSQL/fbt-repository@758d9b5

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 8, 2010

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2010

Commented by: @asfernandes

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2010

Commented by: Mathias MOLLON (mmollon)

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2010

Commented by: @asfernandes

What is a "crash"?

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2010

Commented by: @asfernandes

v2.1 is not correct. Try this: upper('aÿb') -> Aÿb

The function stops on ÿ and do not uppercase b.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2010

Commented by: Mathias MOLLON (mmollon)

Q :What is a "crash"

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

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 1, 2010

Commented by: Karsten Rolfs (solizell)

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 21, 2011

Commented by: Siva Ramanathan (s2ramana)

This problem is present in Firebird 2.5 as well. This seems to be important to fix.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 20, 2013

Modified by: @asfernandes

Link: This issue relate to CORE4123 [ CORE4123 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 20, 2013

Modified by: @asfernandes

Link: This issue is related to CORE1431 [ CORE1431 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 20, 2013

Modified by: @asfernandes

summary: New in 2.1.3 : crash of upper with y trema (code 0xFF in ISO8859_1 ) => Exception when upper casing string with lowercase y trema (code 0xFF in ISO8859_1 )

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 20, 2013

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.5.3 [ 10461 ]

Fix Version: 2.1.6 [ 10460 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 28, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 25, 2015

Modified by: @pcisar

Link: This issue is related to QA599 [ QA599 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment