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

REPLACE function works incorrectly with multibyte charsets [CORE4599] #4914

Closed
firebird-automations opened this issue Nov 7, 2014 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Pablo León (palevi)

Is related to QA614

Test done with flamerobin, though also fails from jaybird:

recreate table test1 \(field1 varchar\(50\)\);

insert into test1 values \('PABLO NUÑEZ SANCHEZ'\);

update test1 set field1=replace\(field1,'Ñ','N'\);

select \* from test1;

and you obtain "PABLO NÑN SANCNZ" instead of expected "PABLO NUNEZ SANCHEZ". I other situations we obtain an OOM error from firebird or even get a server crash, here is server log:

PALEVI-XPS (Server) Fri Nov 07 13:10:53 2014
Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the Firebird server
to terminate abnormally.

PALEVI-XPS (Server) Fri Nov 07 13:10:53 2014
Shutting down the server with 1 active connection(s) to 1 database(s), 0 active service(s)

PALEVI-XPS (Server) Fri Nov 07 13:10:58 2014
Firebird shutdown is still in progress after the specified timeout

PALEVI-XPS (Server) Fri Nov 07 13:10:58 2014
Operating system call ReleaseSemaphore failed. Error code 6

PALEVI-XPS (Server) Fri Nov 07 13:10:58 2014
Operating system call ReleaseSemaphore failed. Error code 6

PALEVI-XPS (Client) Fri Nov 07 13:10:58 2014
"C:\Program Files\Firebird\Firebird_2_5\bin\fbserver.exe": terminated abnormally (4294967295)

Commits: 63dfdc5 0638fee e6941ec FirebirdSQL/fbt-repository@9884641 FirebirdSQL/fbt-repository@c1800f2

====== Test Details ======

Integral test for comparison latin-1 characters with diacritical marks and their ascii-equivalents, all kinds of string matchin.
NOTE: following are letters which currently do NOT pass comparison using accent insensitive collation:
Ø = U+00D8 // LATIN CAPITAL LETTER O WITH STROKE' (U+00D8), used in danish & iceland alphabets;
Ð = U+00D0 // LATIN CAPITAL LETTER ETH' (U+00D0), iceland
Ŀ = U+013F // LATIN CAPITAL LETTER L WITH MIDDLE DOT' (U+013F), catalone (valencian)
Ł = U+0141 // LATIN CAPITAL LETTER L WITH STROKE' (U+0141), polish.

See also: CORE4739.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

summary: replace funcion with utf-8 extrange behaviour => REPLACE function works incorrectly with multibyte charsets

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 2.5.4 [ 10585 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done with caveats

Test Details: Integral test for comparison latin-1 characters with diacritical marks and their ascii-equivalents, all kinds of string matchin.
NOTE: following are letters which currently do NOT pass comparison using accent insensitive collation:
Ø = U+00D8 // LATIN CAPITAL LETTER O WITH STROKE' (U+00D8), used in danish & iceland alphabets;
Ð = U+00D0 // LATIN CAPITAL LETTER ETH' (U+00D0), iceland
Ŀ = U+013F // LATIN CAPITAL LETTER L WITH MIDDLE DOT' (U+013F), catalone (valencian)
Ł = U+0141 // LATIN CAPITAL LETTER L WITH STROKE' (U+0141), polish.

See also: CORE4739.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA614 [ QA614 ]

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