List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:September 6 2001 7:45pm
Subject:LOCK TABLES on compressed tables...
View as plain text  
Hi!

>>>>> "Paul" == Paul Cadach <paul@stripped> writes:

Paul> Hi,
Paul> I'm uses write locks to prevent other people to write to table when I'm
Paul> updates it. When updating I need to select some additional values from other
Paul> table, so I must lock it too. But because table is compressed (aka
Paul> read-only), I can't lock it with write lock. Why?

Because you don't have the permission to use a write lock on the
table.

Why can't you use a READ lock on the compressed tables.

You will get more concurrency if you use READ locks on tables you just
read from...

Paul> As I understand, write lock delays any writes to locked table performed by
Paul> other connections until a table is unlocked. In case with compressed
Paul> (read-only) table, it can be treaded as 'locked for write' all times when
Paul> LOCK TABLE ... WRITE issued.

I still don't see a reason for using a WRITE lock here.

I think it's actually right that you get an error on this, as you will
not be able to update the table anyway.

Regards,
Monty
Thread
LOCK TABLES on compressed tables...Paul Cadach5 Sep
  • Re: LOCK TABLES on compressed tables...Sinisa Milivojevic6 Sep
  • Re: LOCK TABLES on compressed tables...Paul Cadach6 Sep
    • Re: LOCK TABLES on compressed tables...Michael Widenius6 Sep
  • Re: LOCK TABLES on compressed tables...Timothy Smith6 Sep
  • LOCK TABLES on compressed tables...Michael Widenius6 Sep
  • Re: LOCK TABLES on compressed tables...Paul Cadach6 Sep
    • Re: LOCK TABLES on compressed tables...Timothy Smith6 Sep
  • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Paul Cadach7 Sep
  • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Dana Powers7 Sep
  • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Paul Cadach7 Sep
    • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Timothy Smith7 Sep
  • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Paul Cadach7 Sep
    • Re: LOCK TABLES on compressed tables - READ WAIT lock type...Benjamin Pflugmann7 Sep