mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Ensure system tables have proper format. The DFW handler is usually skipped for system tables, unless dfw_update_format is posted explicitly.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ae7bee2664
commit
aa164fb32c
@ -1966,6 +1966,21 @@ static void store_relation(thread_db* tdbb,
|
||||
MetaName securityClass, defaultClass;
|
||||
security.storeSecurityClass(tdbb, securityClass, defaultClass);
|
||||
|
||||
// Find the format matching the number of stored fields
|
||||
// and pass it to RDB$RELATIONS
|
||||
|
||||
USHORT formatNumber = 0;
|
||||
const auto relation = MET_relation(tdbb, relId);
|
||||
fb_assert(relation && relation->rel_formats);
|
||||
for (const auto format : *relation->rel_formats)
|
||||
{
|
||||
if (format->fmt_count == fieldId)
|
||||
{
|
||||
formatNumber = format->fmt_version;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
STORE(REQUEST_HANDLE handle TRANSACTION_HANDLE transaction)
|
||||
X IN RDB$RELATIONS
|
||||
{
|
||||
@ -1985,7 +2000,7 @@ static void store_relation(thread_db* tdbb,
|
||||
X.RDB$DEFAULT_CLASS.NULL = FALSE;
|
||||
|
||||
X.RDB$FIELD_ID = fieldId;
|
||||
X.RDB$FORMAT = 0;
|
||||
X.RDB$FORMAT = formatNumber;
|
||||
X.RDB$SYSTEM_FLAG = RDB_system;
|
||||
X.RDB$DBKEY_LENGTH = 8;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user