Skip to content

Can't backup/restore database from v3 to v4 with SEC$USER_NAME field longer than 10 characters #7611

Closed
@dmitry-starodubov

Description

@dmitry-starodubov

If I have such a simple database

CREATE TABLE T (ID INTEGER NOT NULL,
USER_NAME SEC$USER_NAME,
PASSWD VARCHAR(256) CHARACTER SET OCTETS,
ALG VARCHAR(32) CHARACTER SET UNICODE_FSS);

insert into t values(1, 'aaabbbcccddd', '12345678', '123');

I can backup/restore in on v3.
But when I try to restore backup from v3 on v4 I get an error:
gbak: ERROR:arithmetic exception, numeric overflow, or string truncation
gbak: ERROR: string right truncation
gbak: ERROR: expected length 10, actual 12
gbak: ERROR:gds_$send failed
gbak:Exiting before completion due to errors

Because maximum length of USER_NAME field is calculated wrong.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions