@@ -132,7 +132,7 @@ bool get_collation(BurpGlobals* tdgbl);
132132SLONG get_compressed(BurpGlobals* tdgbl, UCHAR* buffer, SLONG length);
133133void get_data(BurpGlobals* tdgbl, burp_rel*, WriteRelationReq* req);
134134bool get_exception(BurpGlobals* tdgbl);
135- burp_fld* get_field(BurpGlobals* tdgbl, burp_rel*);
135+ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel*, USHORT id );
136136bool get_field_dimensions(BurpGlobals* tdgbl);
137137bool get_files(BurpGlobals* tdgbl);
138138bool get_filter(BurpGlobals* tdgbl);
@@ -3806,7 +3806,7 @@ bool get_exception(BurpGlobals* tdgbl)
38063806}
38073807
38083808
3809- burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
3809+ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation, USHORT id )
38103810{
38113811/**************************************
38123812 *
@@ -3865,6 +3865,9 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
38653865 // ODS 14
38663866 X.RDB$FIELD_SOURCE_SCHEMA_NAME.NULL = TRUE;
38673867
3868+ X.RDB$FIELD_ID.NULL = FALSE;
3869+ X.RDB$FIELD_ID = id;
3870+
38683871 if (relation->rel_name.schema.hasData())
38693872 {
38703873 strcpy(X.RDB$SCHEMA_NAME, relation->rel_name.schema.c_str());
@@ -4084,6 +4087,9 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
40844087 X.RDB$NULL_FLAG.NULL = TRUE;
40854088 X.RDB$COLLATION_ID.NULL = TRUE;
40864089
4090+ X.RDB$FIELD_ID.NULL = FALSE;
4091+ X.RDB$FIELD_ID = id;
4092+
40874093 skip_init(&scan_next_attr);
40884094 while (get_attribute(&attribute, tdgbl) != att_end)
40894095 {
@@ -8249,6 +8255,7 @@ bool get_relation(BurpGlobals* tdgbl, Coordinator* coord, RestoreRelationTask* t
82498255 // Eat up misc. records
82508256 burp_fld* field = NULL;
82518257 burp_fld** ptr = &relation->rel_fields;
8258+ USHORT id = 0;
82528259
82538260 rec_type record;
82548261 while (get_record(&record, tdgbl) != rec_data)
@@ -8277,7 +8284,7 @@ bool get_relation(BurpGlobals* tdgbl, Coordinator* coord, RestoreRelationTask* t
82778284 return true;
82788285
82798286 case rec_field:
8280- *ptr = field = get_field (tdgbl, relation);
8287+ *ptr = field = get_field(tdgbl, relation, id++ );
82818288 if (!field)
82828289 return false;
82838290 ptr = &field->fld_next;
0 commit comments