Re: question about locks with optimize table

Michael Widenius <[email protected]>
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>
Hi!

>>>>> "Zardosht" == Zardosht Kasheff <[email protected]> writes:

Zardosht> In this region of code that is locking out other clients, I don't see
table-> lock set to TL_WRITE_ALLOW_WRITE, even though store_lock does
Zardosht> so. It does not seem to be working.

Yes, you are right. store_lock modifies the MYSQL_LOCK structure
and not table->lock.

We should probably fix this in lock.cc:get_lock_data() so that we
store in table->used_lock the real lock we got after store_lock and
use this in the problem code.

Zardosht> Here is the big question. If we change the code somehow such that for
Zardosht> our engine, the below if-clause evaluates to FALSE, would that be ok?

Zardosht>     if (lock_type == TL_WRITE && table->table->s->version)
Zardosht>     {
Zardosht>       DBUG_PRINT("admin", ("removing table from cache"));

Yes, that should be ok.

Regards,
Monty

-- 
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.