[Mono-devel-list] Re: [Mono-patches] r44988 - in trunk/mcs/class/System.Data: System.Data Test/System.Data

Sureshkumar T tsureshkumar at novell.com
Thu May 26 09:11:58 EDT 2005


>                            index.Update (this, temp);
> >+
> >+                                if (HasVersion (DataRowVersion.Current))
> >+                                        Table.RecordCache.DisposeRecord (Current);
> >+                                Current = temp;
> >  
> >
> Is there some special reason for first updating Original version, then 
> updating an index, and then updating the Current version? Since index 
> built on RowState.None, it uses Default (and not updated) value in index 
> update.

yes, refer msdn DataTable.Load (object [], LoadOption) method for the
matrix of initial & states.  First thing, I had to do was remove the
regressions caused by your indexes redesign pathes. So, my patch is
mainly a incremental patch, with the following things to be done yet.

      * Since I am changing Original & Current Records, I have to update
        all the indexes which could get invalidated for that row. Best
        way is to update the respective indexes in the Original/Current
        property setters. Let me know if you have some other index
        updating mechanism. Ideally, Original re-assigning also should
        update indexes. I'll be doing that fix later. Otherwise, we can
        rebuild indexes at the end of LoadDataRow method.
      * RowState.None is probably an oversight as that is how you are
        dealing with indexes with PK in other parts.  This custom
        updating would be removed if above point is completed.

Thanks & Best Regards,
suresh.



More information about the Mono-devel-list mailing list