List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:December 29 2011 10:53pm
Subject:Re: question about locks with optimize table
View as plain text  
Hi!

>>>>> "Zardosht" == Zardosht Kasheff <zardosht@stripped> 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
Thread
question about locks with optimize tableJohn Esmet15 Dec
  • Re: question about locks with optimize tableJohn Esmet19 Dec
  • re: question about locks with optimize tableMichael Widenius27 Dec
Re: question about locks with optimize tableZardosht Kasheff28 Dec
Re: question about locks with optimize tableMichael Widenius28 Dec
  • Re: question about locks with optimize tableZardosht Kasheff28 Dec
    • Re: question about locks with optimize tableMichael Widenius29 Dec