Many thanks, Sergei. Your reply clarifies the proper use of a handler
object.
Regards,
-Ron Hu
> -----Original Message-----
> From: Sergei Golubchik [mailto:serg@stripped]
> Sent: Monday, March 16, 2009 9:25 AM
> To: Ron Hu
> Cc: internals@stripped
> Subject: Re: Is handler object shared by two concurrent users?
>
> Hi, Ron!
>
> On Mar 12, Ron Hu wrote:
> > Hi Sergei:
> >
> > Thanks for your reply. It helps. I have a more complex test case to
> show
> > that same handler is shared by two concurrent users to some degree. I
> want
> > to know the scope where a handler is not shared among users. Is it
> between
> > the pair of ::external_lock calls (imposing a lock and release a lock)?
> If
> > so, then store_lock is not within the scope.
>
> Right, but store_lock() is more like a class method, it isn't supposed
> to modify (or even access) the object's state. All it should do is to
> store its third parameter's value into its second parameter's value
> pointer. Possibly modifying the value according to the engine's logic.
> But nothing dependent on the handler object itself.
>
> > Also some methods such as delete_table is not within the pair of
> > ::external_lock calls. What other methods are not within the pair of
> > ::external_lock calls?
>
> Certain DDL and admin methods, like rename or repair. But metadata locks
> (name locks in 5.1) should protect agains concurrent renames or repairs
> (or delete_table()s).
>
> Regards / Mit vielen Grüßen,
> Sergei
>
> --
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
> / /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
> /_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
> <___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
> Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
> Vorsitzender des Aufsichtsrates: Martin Häring
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals?unsub=1