
|
If you were logged in you would be able to see more operations.
|
|
|
| Planning Status: |
Unspecified
|
|
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.
|
|
Description
|
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.
|
Show » |
|