View Issue Details

IDProjectCategoryView StatusLast Update
0001051Interbase/Firebird[All Projects] Generalpublic2019-04-18 19:46
ReportershirokovAssigned Tobarry 
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001051: Error in the Database Comparer when comparing the fields description of a view (Firebird 2.5)
DescriptionThe error occurs if the master objects are read out of a scriptfile. In this case the fields (TFldData) of the View (TViwData) don't have the properties "OwnName" and "OwnObject" set. But it seems to be required in the procedure GenScriptViewAlter.

The attached archive contains both master and target DBs and the resulting script.

The problem can be fixed by adding the following code to the TIbParser.ParseView method:

procedure TIbParser.ParseView(caSy: TSymbol);
  vData: TViwData;
  i: Integer;
  fldData: TFldData;
  vData := TViwData.Create(Objs);
  vData.ObjName := Ident;
  if Sy = lParentSy then IdxFieldsList(vData.Flds);
  for i := 0 to vData.Flds.Count - 1 do
    fldData := vData.Flds.Objects[i] as TFldData;
    if Assigned(fldData) then
      fldData.OwnName := vData.ObjName;
      fldData.OwnObj := vData;
//<-- end fix
  DoLogNextLine('View: '+vData.ObjName);
  DoAddStatement(stStatement, vData.ObjName, dboView, odbCreate, '', fStatement);
TagsNo tags attached.



2017-04-27 10:49

administrator (2,664 bytes)

Issue History

Date Modified Username Field Change
2017-04-27 10:49 shirokov New Issue
2017-04-27 10:49 shirokov File Added:
2017-05-15 16:17 barry Assigned To => barry
2017-05-15 16:17 barry Status new => assigned
2018-06-01 05:24 barry Status assigned => resolved
2018-06-01 05:24 barry Resolution open => fixed
2019-04-18 19:46 barry Status resolved => closed