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

Lenght of field names when using special character [CORE5960] #6214

Closed
firebird-automations opened this issue Nov 9, 2018 · 5 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Florian (flomo)

Duplicates CORE5001

After upgrading from FB 2.5 to FB 3.0.4 via backup/restore cycle the new FB 3 throws the following error on select:

Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string truncation.
string right truncation.
expected length 31, actual 31.

The boiled down select statement is this: SELECT Zeitstempel, CALCAVGTEMP as "24h Mittelwert Aussentemp. (°C)" from OPCValues

The culprit seems to be the special character °, it appears to count as two characters.
The statement works fine in FB 2.5

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

This is not a bug, it is an intentional enforcement of the previously existing technical limit of 31 **bytes**, not characters, see the Firebird 3 release notes: https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-sql.html#rnfb30-compat-psql-namelengths and CORE2350; it was previously either silently truncated to 31 bytes (as that degree symbol actually takes not 1 bytes, but 2 in utf-8.

If you want to use longer names, you'll have to wait for Firebird 4, which raises the limit to 63 characters UTF8 (at 63 * 4 bytes = 252 bytes)

@firebird-automations
Copy link
Collaborator Author

Modified by: @mrotteveel

Link: This issue duplicates CORE5001 [ CORE5001 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Florian (flomo)

Mark,

thanks for the update, I was not aware that the degree sign is a multibyte character.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Won't Fix [ 2 ]

@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

1 participant