8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Fixed CORE-2793: Binary representation of the backup file is inconsistent among subsequent backup/restore cycles.

This commit is contained in:
dimitr 2010-01-15 10:09:50 +00:00
parent dfe984e332
commit 7b1f188656
2 changed files with 20 additions and 16 deletions

View File

@ -557,7 +557,8 @@ burp_fld* get_fields( burp_rel* relation)
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
USHORT count = 1;
burp_fld* fields = NULL;
Firebird::HalfStaticArray<burp_fld*, 16> field_list;
// if we have all capabilities, use the first request to get the
// most performance out of the latest engine; if we don't
@ -670,15 +671,14 @@ burp_fld* get_fields( burp_rel* relation)
field->fld_flags |= FLD_collate_flag;
}
field->fld_next = fields;
fields = field;
// ODS 12
if (!X.RDB$GENERATOR_NAME.NULL)
{
COPY(X.RDB$GENERATOR_NAME, field->fld_generator);
field->fld_identity_type = X.RDB$IDENTITY_TYPE;
}
field_list.add(field);
}
END_FOR
ON_ERROR
@ -790,8 +790,7 @@ burp_fld* get_fields( burp_rel* relation)
field->fld_flags |= FLD_collate_flag;
}
field->fld_next = fields;
fields = field;
field_list.add(field);
}
END_FOR
ON_ERROR
@ -799,6 +798,15 @@ burp_fld* get_fields( burp_rel* relation)
END_ERROR
}
burp_fld* fields = NULL;
while (field_list.getCount())
{
field = field_list.pop();
field->fld_next = fields;
fields = field;
}
return fields;
}
@ -3233,9 +3241,9 @@ void write_global_fields()
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
BURP_verbose (149, temp);
// msg 149 writing global field %.*s
if (X.RDB$QUERY_NAME [0] != ' ')
if (!X.RDB$QUERY_NAME.NULL && X.RDB$QUERY_NAME [0] != ' ')
PUT_TEXT (att_field_query_name, X.RDB$QUERY_NAME);
if (X.RDB$EDIT_STRING [0] != ' ')
if (!X.RDB$EDIT_STRING.NULL && X.RDB$EDIT_STRING [0] != ' ')
PUT_TEXT (att_field_edit_string, X.RDB$EDIT_STRING);
put_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
@ -3305,9 +3313,9 @@ void write_global_fields()
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
BURP_verbose (149, temp);
// msg 149 writing global field %.*s
if (X.RDB$QUERY_NAME [0] != ' ')
if (!X.RDB$QUERY_NAME.NULL && X.RDB$QUERY_NAME [0] != ' ')
PUT_TEXT (att_field_query_name, X.RDB$QUERY_NAME);
if (X.RDB$EDIT_STRING [0] != ' ')
if (!X.RDB$EDIT_STRING.NULL && X.RDB$EDIT_STRING [0] != ' ')
PUT_TEXT (att_field_edit_string, X.RDB$EDIT_STRING);
put_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
@ -3373,9 +3381,9 @@ void write_global_fields()
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
BURP_verbose (149, temp);
// msg 149 writing global field %.*s
if (X.RDB$QUERY_NAME [0] != ' ')
if (!X.RDB$QUERY_NAME.NULL && X.RDB$QUERY_NAME [0] != ' ')
PUT_TEXT (att_field_query_name, X.RDB$QUERY_NAME);
if (X.RDB$EDIT_STRING [0] != ' ')
if (!X.RDB$EDIT_STRING.NULL && X.RDB$EDIT_STRING [0] != ' ')
PUT_TEXT (att_field_edit_string, X.RDB$EDIT_STRING);
put_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
put_numeric (att_field_type, X.RDB$FIELD_TYPE);

View File

@ -3577,7 +3577,6 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
{
strcpy (X.RDB$RELATION_NAME, relation->rel_name);
X.RDB$FIELD_POSITION = 0;
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
X.RDB$VIEW_CONTEXT.NULL = TRUE;
X.RDB$BASE_FIELD.NULL = TRUE;
X.RDB$SECURITY_CLASS.NULL = TRUE;
@ -3787,7 +3786,6 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
{
strcpy (X.RDB$RELATION_NAME, relation->rel_name);
X.RDB$FIELD_POSITION = 0;
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
X.RDB$VIEW_CONTEXT.NULL = TRUE;
X.RDB$BASE_FIELD.NULL = TRUE;
X.RDB$SECURITY_CLASS.NULL = TRUE;
@ -5544,7 +5542,6 @@ bool get_global_field(BurpGlobals* tdgbl)
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
X.RDB$COLLATION_ID.NULL = TRUE;
X.RDB$FIELD_PRECISION.NULL = TRUE;
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
@ -5895,7 +5892,6 @@ bool get_global_field(BurpGlobals* tdgbl)
X.RDB$FIELD_SUB_TYPE.NULL = TRUE;
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
X.RDB$COLLATION_ID.NULL = TRUE;
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)