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

Wrong numbers in error message for decreasing char/varchar columns [CORE3894] #4230

Closed
firebird-automations opened this issue Jul 21, 2012 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @ibaseru

Is related to QA576

Alterting char/varchar columns to lower size produces error

New size specified for column fff must be at least NN characters.

where NN is bytes per character, not character size of field/domain itself.

Example to reproduce (employee):

ALTER TABLE EMPLOYEE ADD UTF VARCHAR(100) CHARACTER SET UTF8;
commit;
ALTER TABLE EMPLOYEE ALTER COLUMN UTF8 TYPE VARCHAR(90);

error message says

This operation is not defined for system tables.
unsuccessful metadata update.
New size specified for column UTF must be at least 400 characters.

where, as you see, 400 is rdb$field_length, not rdb$character_length (100).

So, correct error message must be
New size specified for column UTF must be at least 100 characters.

Commits: 94a9c6d

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA576 [ QA576 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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