Fabio Galarraga wrote:
>
> Yes, I think this is the problem. But how can I make a read/write lock with
> only one lock?
>
> Best regards,
> Fabio.
>
> > ----------
> > De: Gerald L. Clark[SMTP:gerald_clark@stripped]
> > Enviado el: Martes, Marzo 20, 2001 04:33 PM
> > Para: Fabio Galarraga
> > CC: 'Mysql mailing list'
> > Asunto: Re: Read/write table lock
> >
> > Fabio Galarraga wrote:
If you issue a READ lock, nobody can write to the table.
If you Issue a Write lock, only you may read or write to the table.
Nobody can read a file you have locked for write.
> > >
> > > Hi to all:
> > > Somebody knows how to make a read/writa table lock?
> > > I'm trying with java source:
> > >
> > > stmt.execute("LOCK TABLES table-x READ, table-x WRITE");
> > > ----
> > > stmt.execute("UNLOCK TABLES");
> > >
> > > but it fails.
> > >
> > > Best regards,
> > > Fabio Galarraga
> > > fabio@stripped
> > >
> > Well you are locking table-x twice in the same lock.
> >