List:Internals« Previous MessageNext Message »
From:Paul Cadach Date:September 6 2001 11:45am
Subject:Re: LOCK TABLES on compressed tables...
View as plain text  
Hi,

----- Original Message -----
From: "Sinisa Milivojevic" <sinisa@stripped>
To: "Paul Cadach" <paul@stripped>
Cc: <internals@stripped>
Sent: Thursday, September 06, 2001 5:13 PM
Subject: Re: LOCK TABLES on compressed tables...


> On Wed, 5 Sep 2001 18:14:01 +0700
> "Paul Cadach" <paul@stripped> wrote:
>
> > Hi,
> >
> > I'm uses write locks to prevent other people to write to table when I'm
> > updates it. When updating I need to select some additional values from
other
> > table, so I must lock it too. But because table is compressed (aka
> > read-only), I can't lock it with write lock. Why?
> >
> > As I understand, write lock delays any writes to locked table performed
by
> > other connections until a table is unlocked. In case with compressed
> > (read-only) table, it can be treaded as 'locked for write' all times
when
> > LOCK TABLE ... WRITE issued.

[skip]

> If you are using MyISAM tables, then you do not need to LOCK them for
UPDATE, as MySQL uses table locks for updates.
>
> For the same reason, locking of the table that is to be read is not
necessary as row that you are reading can not be changed while you are
reading it.

I needs to perform some sequential queries (select and updates) and I must
sure that noone writes to tables at this time. For single queries I'm never
uses locks...


WBR,
Paul.


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