Re: [PHP] LOCKS???

[email protected] (Aziz Saleh)
Newsgroups php.general
Message-ID <CAPJtNhWQBOG7GciMV4b0JJY=MfHQTd9jwLZT+gqG0K+Qr70Nww@mail.gmail.com>
On Sun, Nov 27, 2016 at 11:33 PM, Paul M Foster <[email protected]>
wrote:

> On Sun, Nov 27, 2016 at 07:59:58PM -0500, Aziz Saleh wrote:
>
> > On Sun, Nov 27, 2016 at 6:37 PM, Tedd Sperling <[email protected]>
> > wrote:
> >
> > > Hi gang:
> > >
> > > I’ve read a bunch about MYSQL LOCKs, but I can seem to get them to
> work.
> > >
> > > For example, I have two computers accessing the same host (i.e., thus
> each
> > > with different SIDs) and accessing two different scripts. One script
> > > performs a "LOCK TABLES t WRITE" and the second script tries to read
> TABLE
> > > t. While the LOCK is in place, the second script has no problem
> reading and
> > > writing to TABLE t.
> > >
> > > I don’t understand what's wrong — any ideas?
>
> [snip]
>
> > You are running a LOCK on writes, not reads, so the second script is
> > performing fine.
> >
> > Also you don't need multiple sessions to test LOCK mechanism, should be
> > able to test it with just 1 session.
> >
> > http://dev.mysql.com/doc/refman/5.7/en/lock-tables.html
>
> Read what Tedd wrote again. The second script is reading and WRITING to
> the tables.
>
> Paul
>
> --
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com
>

Thanks Paul, I see it now. My mistake for skimming.
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.