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:
parent
dfe984e332
commit
7b1f188656
@ -557,7 +557,8 @@ burp_fld* get_fields( burp_rel* relation)
|
|||||||
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
|
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
|
||||||
|
|
||||||
USHORT count = 1;
|
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
|
// if we have all capabilities, use the first request to get the
|
||||||
// most performance out of the latest engine; if we don't
|
// 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_flags |= FLD_collate_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
field->fld_next = fields;
|
|
||||||
fields = field;
|
|
||||||
|
|
||||||
// ODS 12
|
// ODS 12
|
||||||
if (!X.RDB$GENERATOR_NAME.NULL)
|
if (!X.RDB$GENERATOR_NAME.NULL)
|
||||||
{
|
{
|
||||||
COPY(X.RDB$GENERATOR_NAME, field->fld_generator);
|
COPY(X.RDB$GENERATOR_NAME, field->fld_generator);
|
||||||
field->fld_identity_type = X.RDB$IDENTITY_TYPE;
|
field->fld_identity_type = X.RDB$IDENTITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
field_list.add(field);
|
||||||
}
|
}
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
@ -790,8 +790,7 @@ burp_fld* get_fields( burp_rel* relation)
|
|||||||
field->fld_flags |= FLD_collate_flag;
|
field->fld_flags |= FLD_collate_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
field->fld_next = fields;
|
field_list.add(field);
|
||||||
fields = field;
|
|
||||||
}
|
}
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
@ -799,6 +798,15 @@ burp_fld* get_fields( burp_rel* relation)
|
|||||||
END_ERROR
|
END_ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
burp_fld* fields = NULL;
|
||||||
|
|
||||||
|
while (field_list.getCount())
|
||||||
|
{
|
||||||
|
field = field_list.pop();
|
||||||
|
field->fld_next = fields;
|
||||||
|
fields = field;
|
||||||
|
}
|
||||||
|
|
||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3233,9 +3241,9 @@ void write_global_fields()
|
|||||||
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
|
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
|
||||||
BURP_verbose (149, temp);
|
BURP_verbose (149, temp);
|
||||||
// msg 149 writing global field %.*s
|
// 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);
|
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_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_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
|
||||||
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
|
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));
|
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
|
||||||
BURP_verbose (149, temp);
|
BURP_verbose (149, temp);
|
||||||
// msg 149 writing global field %.*s
|
// 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);
|
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_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_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
|
||||||
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
|
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));
|
MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof(temp));
|
||||||
BURP_verbose (149, temp);
|
BURP_verbose (149, temp);
|
||||||
// msg 149 writing global field %.*s
|
// 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);
|
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_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_source_blob (att_field_query_header, att_field_query_header, X.RDB$QUERY_HEADER);
|
||||||
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
|
put_numeric (att_field_type, X.RDB$FIELD_TYPE);
|
||||||
|
@ -3577,7 +3577,6 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation)
|
|||||||
{
|
{
|
||||||
strcpy (X.RDB$RELATION_NAME, relation->rel_name);
|
strcpy (X.RDB$RELATION_NAME, relation->rel_name);
|
||||||
X.RDB$FIELD_POSITION = 0;
|
X.RDB$FIELD_POSITION = 0;
|
||||||
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
|
|
||||||
X.RDB$VIEW_CONTEXT.NULL = TRUE;
|
X.RDB$VIEW_CONTEXT.NULL = TRUE;
|
||||||
X.RDB$BASE_FIELD.NULL = TRUE;
|
X.RDB$BASE_FIELD.NULL = TRUE;
|
||||||
X.RDB$SECURITY_CLASS.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);
|
strcpy (X.RDB$RELATION_NAME, relation->rel_name);
|
||||||
X.RDB$FIELD_POSITION = 0;
|
X.RDB$FIELD_POSITION = 0;
|
||||||
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
|
|
||||||
X.RDB$VIEW_CONTEXT.NULL = TRUE;
|
X.RDB$VIEW_CONTEXT.NULL = TRUE;
|
||||||
X.RDB$BASE_FIELD.NULL = TRUE;
|
X.RDB$BASE_FIELD.NULL = TRUE;
|
||||||
X.RDB$SECURITY_CLASS.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$CHARACTER_SET_ID.NULL = TRUE;
|
||||||
X.RDB$COLLATION_ID.NULL = TRUE;
|
X.RDB$COLLATION_ID.NULL = TRUE;
|
||||||
X.RDB$FIELD_PRECISION.NULL = TRUE;
|
X.RDB$FIELD_PRECISION.NULL = TRUE;
|
||||||
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
|
|
||||||
|
|
||||||
skip_init(&scan_next_attr);
|
skip_init(&scan_next_attr);
|
||||||
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
|
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$FIELD_SUB_TYPE.NULL = TRUE;
|
||||||
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
|
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
|
||||||
X.RDB$COLLATION_ID.NULL = TRUE;
|
X.RDB$COLLATION_ID.NULL = TRUE;
|
||||||
memset (X.RDB$QUERY_NAME, ' ', sizeof(X.RDB$QUERY_NAME));
|
|
||||||
|
|
||||||
skip_init(&scan_next_attr);
|
skip_init(&scan_next_attr);
|
||||||
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
|
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
|
||||||
|
Loading…
Reference in New Issue
Block a user