Hi!
>>>>> "Sergei" == Sergei Golubchik <serg@stripped> writes:
Sergei> Hi!
Sergei> On May 09, Timothy P Clark wrote:
>>
>> As it is, I'm having to scatter code to clean up resources across
>> several of these functions. Then it's a process of trial and error
>> while I figure out what is being freed too early and what is leaking.
>> What I need is a single handler method that MySQL calls to say, "This
>> statement is done; results have been sent to the user; whatever
>> resources you needed internally to accomplish this operation may now
>> be freed." Am I missing something that already exists? Is there a
>> reliable way to do this with the current design?
Sergei> It's external_lock() at the moment (called with lock_type=F_UNLCK).
A better place is to do it in handler::reset(), called by
handler::ha_reset() which is called by close_thread_table() after each
statement.
The idea of the 'handler::reset()' is to set the handler to a state as
if we just had opened the table but not yet done anything with it.
Regards,
Monty