Issue Details (XML | Word | Printable)

Key: CORE-5290
Type: Bug Bug
Status: Open Open
Priority: Blocker Blocker
Assignee: Adriano dos Santos Fernandes
Reporter: Fabrice
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

LPAD failed returning Message length error (Encountered 2, expected 65538)

Created: 22/Jun/16 02:58 PM   Updated: 22/Jun/16 10:20 PM
Component/s: None
Affects Version/s: 3.0.0
Fix Version/s: None

File Attachments: 1. File c5290-test.7z (0.6 kB)
2. File de0.7z (0.5 kB)

Environment:
Firebird 3.0 64 bits Superserver, Windows 10 64 bits
Database in Dialect 1 charset = none

QA Status: No test


 Description  « Hide
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)"





 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 22/Jun/16 06:03 PM
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.

Fabrice added a comment - 22/Jun/16 06:20 PM
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;

Dmitry Yemanov added a comment - 22/Jun/16 06:24 PM
What client library version is used? What tool is used to run the query? Did you try with ISQL?

Dmitry Yemanov added a comment - 22/Jun/16 06:59 PM
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).

Fabrice added a comment - 22/Jun/16 08:58 PM
> 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)"

Fabrice added a comment - 22/Jun/16 10:20 PM
FBCLIENT.DLL = 3.0.0.32483 (32 bits)