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
incorrect calculation of byte-length for view columns (as in CORE-5049) [CORE6380] #6619
Comments
Commented by: @dyemanov Result of COALESCE is VARCHAR(2048) UTF8 (due to empty string literal in UTF8), thus 8KB in size. So the overall concatenation size is more than 64KB. I don't see a bug here. |
Commented by: @dyemanov Compare with e.g. coalesce(test_name, _ascii '') or coalesce(test_name, _win1251 ''). Or use WIN1251 as a connection charset. |
Commented by: @livius2 Why it is utf8 not default database charset? |
Commented by: @dyemanov String literals are implied to be represented in the connection charset, not the database charset. |
Commented by: Artem Anufriev (atronah) Thank you for the clarification. I develop side project for existed production database that has win1251 charset as default, but my project stores sql scripts in utf8 files. And when I ran tests they fell because of problem described above. I'll try to use charset "_win1251" modifiers |
Commented by: Sean Leyne (seanleyne) This ticket seems to need "won't fix" resolution, no? |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Artem Anufriev (atronah)
C:\>isql.exe -ch utf8 -user SYSDBA -pass masterkey
create database '127.0.0.1:c:\TEST_BUG.FDB' page_size 16384 default character set win1251; commit;
connect '127.0.0.1:c:\TEST_BUG.FDB' user 'SYSDBA' password 'masterkey';
create table test_table(
test_code bigint
, test_name varchar(2048)
);
create or alter view test_view as
select distinct
'[' || test_code || ']' || coalesce(test_name, '') as test_field1
, '[' || test_code || ']' || coalesce(test_name, '') as test_field2
, '[' || test_code || ']' || coalesce(test_name, '') as test_field3
, '[' || test_code || ']' || coalesce(test_name, '') as test_field4
, '[' || test_code || ']' || coalesce(test_name, '') as test_field5
, '[' || test_code || ']' || coalesce(test_name, '') as test_field6
, '[' || test_code || ']' || coalesce(test_name, '') as test_field7
, '[' || test_code || ']' || coalesce(test_name, '') as test_field8
from test_table;
Statement failed, SQLSTATE = 54000
unsuccessful metadata update
-new record size of 66260 bytes is too big
-TABLE TEST_VIEW
The text was updated successfully, but these errors were encountered: