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

LPAD failed returning Message length error (Encountered 2, expected 65538) [CORE5290] #5568

Open
firebird-automations opened this issue Jun 22, 2016 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Fabrice (fabinfo)

Attachments:
c5290-test.7z
de0.7z

Script :
CREATE TABLE testlpad
(
t_key integer not null,
t_value integer,
primary key( t_key)
);
COMMIT;
insert into testlpad
(t_key,t_value)
values (0,1);
insert into testlpad
(t_key,t_value)
values (1,2);
insert into testlpad
(t_key,t_value)
values (2,3);
COMMIT;

This query will :
SELECT lpad('', t_value,'-')
from testlpad

failed with error "Message length error (Encountered 2, expected 65538)"

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: c5290-test.7z [ 12974 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

On WI-V3.0.1.32539:

1) no problems when script contains 'set list ON' ISQL command;
2) lines are padded to 65535 bytes when set list OFF - see attachment.

@firebird-automations
Copy link
Collaborator Author

Commented by: Fabrice (fabinfo)

Hello,

Same problem with a new created database DIALECT 1.
Same problem with dialect 3.
=> Problem is with Default Character Set = NONE <=
because there no problem when
Default Character Set = UTF8

See in attchament :

CREATE DOMAIN MON$SEC_DATABASE
AS CHAR(7) CHARACTER SET ASCII
NOT NULL
COLLATE ASCII;
CREATE DOMAIN SEC$KEY
AS VARCHAR(10) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS;
CREATE DOMAIN SEC$NAME_PART
AS VARCHAR(10) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS;
CREATE DOMAIN SEC$USER_NAME
AS VARCHAR(10) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS;
CREATE DOMAIN SEC$VALUE
AS VARCHAR(85) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS;
/******************* PROCEDURES ******************/
/******************** TABLES **********************/
CREATE TABLE TESTLPAD
(
T_KEY INTEGER NOT NULL,
T_VALUE INTEGER,
CONSTRAINT INTEG_2 PRIMARY KEY (T_KEY)
);
/********************* VIEWS **********************/
/******************* EXCEPTIONS *******************/
/******************** TRIGGERS ********************/
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON TESTLPAD TO SYSDBA WITH GRANT OPTION;

@firebird-automations
Copy link
Collaborator Author

Modified by: Fabrice (fabinfo)

Attachment: de0.7z [ 12975 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

What client library version is used? What tool is used to run the query? Did you try with ISQL?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

AFAIU, the problem is that LPAD was described as VARCHAR(32767) in v2.x but now described as VARCHAR(65535) in v3.0. And this together with overhead overflows the old API message limit (64KB).

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Fabrice (fabinfo)

> What client library version is used? What tool is used to run the query? Did you try with ISQL?

1) With Flamerobin it's crash
2) On Delphi + IBDAC it give error "Message length error (Encountered 2, expected 65538)"

@firebird-automations
Copy link
Collaborator Author

Commented by: Fabrice (fabinfo)

FBCLIENT.DLL = 3.0.0.32483 (32 bits)

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

No branches or pull requests

2 participants