[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: what do we think about this row destroy
> From: Andy Bierman [mailto:abierman@cisco.com]
>
> >> I think a better approach would be to return a inconsistentValue
> >> which should hint to the manager that some other table entries
> >> in other tables need to be deleted first.
> >
> >Was there a good reason in this case why a set to destroy shouldn't
> >instead have a side effect of changing/deleting the other
> >RowPointer objects?
>
> From a programmer's perspective: you never ever NULL out a pointer
> in use as some side effect. The code using that pointer only
> checks for NULL when the pointer is initially set and not before
> every use of the pointer.
A RowPointer is not necessarily implemented as a pointer.
I don't see this as much different from deleting a row where
another table extends the table by using the same INDEX objects
and possibly more. Deleting a row in the first table often has
the side effect of deleting dependent rows in other tables.
-Dave