Re: handlerton info method locking

Sergei Golubchik <[email protected]>
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>
Hi, John!

On Feb 24, John Esmet wrote:
> Any insight on this? I'm wondering if it's necessary to do my own
> table-level locking (say, for shared variables among threads on the
> same table) inside the handlerton's info method.

Yes, it is. It could be something simple, like a mutex that protects
shared data, but you need to take care of locking it.

There's HA_STATUS_NO_LOCK though. But it doesn't mean that all locking
is done for you.  See the comment in my_base.h.

Regards,
Sergei

> On Thu, Feb 23, 2012 at 3:07 PM, John Esmet <[email protected]> wrote:
> > Hello all,
> >
> > What is the expected locking behavior of 'show table status' and the
> > ::info method in the handlerton? I'm observing unlocked access to
> > ::info when other threads have TL_WRITE locks on the table, so I'm
> > curious if it is normal/expected for threads to call ::info on a
> > write-locked table.

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.