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
Regards / Mit vielen Grüßen,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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