-
Notifications
You must be signed in to change notification settings - Fork 64
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
SEC$GLOBAL_AUTH_MAPPING wrong field sizes #304
Comments
remember that i post above that i connect to Firebird 3 |
I'm trying to understand where this |
Hi, can you provide an reproducible database for me to take a look? |
I added an attachment with the sample database. Register it with utf8 like here #304 (comment) |
So, looks like Fb3 and 4+ handles
Note that there is another field
|
Looks like it's something related to Fb3 itself, running this SQL in Fb3 brings tons of records, for Fb2.5,4 and 5 none:
|
Until Firebird 4.0, the system columns for identifiers with character set UNICODE_FSS are special, in that they are CHAR(31), but also only max 31 bytes long (and not 3 * 31 = 93 bytes like normal CHAR(31) CHARACTER SET UNICODE_FSS columns). Only for system columns, dividing by RDB$CHARACTER_SET.RDB$BYTES_PER_CHARACTER is the wrong way to derive their length (because you end up with 10 instead of 31). The reason that the query by @arvanus is different between Firebird 2.5 and Firebird 3.0 is that in Firebird 2.5, the RDB$CHARACTER_LENGTH column is NULL for those columns, while in Firebird 3.0 it reports 31. The reason it is different in Firebird 4.0 and higher is because those columns are now CHAR(63) CHARACTER SET UTF8 with RDB$FIELD_LENGTH = 252 and RDB$CHARACTER_LENGTH = 63. |
Hello Mark, first of all thank you for your detailed answer! |
Also, why does if I create an table in the employee DB (FB3), with a char(30) charset UNICODE_FSS, it will display correctly as 90 bytes and 30 char length?
|
As I said, system columns for identifiers are special: they are 31 characters and 31 bytes long, while a "normal" This isn't specific to
Yes, that sounds OK to me. |
Open anyd Firebird 3 database. Go to System tables and open properties of
SEC$GLOBAL_AUTH_MAPPING
.There are wrong field sizes like
Char(0)
othere sizes are also wrongwhen you do select, descriptions of fields are ok:
The text was updated successfully, but these errors were encountered: