You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code, calling RIGHT() on a 1024-char UTF8 blob:
with q \(s\) as \(
select
cast\(
cast\('AAA' as char\(1021\)\) \|\| 'ZZZ'
as blob sub\_type text character set utf8
\)
from rdb$database
\)
select right\(s, 3\) from q
returns 'ZZZ' (OK)
If I make it a 1025-char blob:
with q \(s\) as \(
select
cast\(
cast\('AAA' as char\(1022\)\) \|\| 'ZZZ'
as blob sub\_type text character set utf8
\)
from rdb$database
\)
select right\(s, 3\) from q
the result is
335544321
arithmetic exception, numeric overflow, or string truncation
Cannot transliterate character between character sets
With CHAR type UTF8 strings, this error doesn't happen.
With single-byte charsets, RIGHT() works correctly with text blobs of any size (also > 32K).
LEFT() does not have this bug, and functions correctly with multi-byte charset text blobs of any size.
Submitted by: @paulvink
Is related to QA282
This code, calling RIGHT() on a 1024-char UTF8 blob:
returns 'ZZZ' (OK)
If I make it a 1025-char blob:
the result is
With CHAR type UTF8 strings, this error doesn't happen.
With single-byte charsets, RIGHT() works correctly with text blobs of any size (also > 32K).
LEFT() does not have this bug, and functions correctly with multi-byte charset text blobs of any size.
Commits: 877b408 33c0372 ca35503
The text was updated successfully, but these errors were encountered: