← Back to team overview

drizzle-discuss team mailing list archive

Re: libdrizzle: drizzle_result_create on a used result structure?

 

I like the idea of an optional "sanity check" flag. I can imagine that if you had lots of connections open, scanning the connections for existing result structures could be relatively costly. Its useful when debugging: much nicer that random corruption, but I'm afraid it isn't a "cheap" check that should always be enabled?


On Dec 13, 2009, at 12:22 , Eric Day wrote:
As far as assertions, I try to avoid them and instead report an error
in a sane way if possible.

Fair enough. Unfortunately, one way to "catch" this error happens pretty late: when trying to free result structures, you can look for the single circular list item that was causing a loop (->next == - >prev == current). However, at this point some corruption may have already occurred, and it might be confusing to debug this error. Thus, I'm not sure if adding a check for this is particularly useful.

Thanks,

Evan

--
Evan Jones
http://evanjones.ca/




Follow ups

References