Re: [PHP] LOCKS???
- Date: Sun, 27 Nov 2016 19:59:58 -0500
- From: Aziz Saleh <azizsaleh@xxxxxxxxx>
- Subject: Re: [PHP] LOCKS???
On Sun, Nov 27, 2016 at 6:37 PM, Tedd Sperling <tedd.sperling@xxxxxxxxx>
> 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?
> tedd sperling
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
You are running a LOCK on writes, not reads, so the second script is
Also you don't need multiple sessions to test LOCK mechanism, should be
able to test it with just 1 session.