Re: LOCKS???

From: Date: Tue, 29 Nov 2016 17:38:48 +0000
Subject: Re: LOCKS???
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-325856@lists.php.net to get a copy of this message
> On Nov 28, 2016, at 10:44 AM, Joshua Kehn <josh@kehn.us> wrote: > > Are you using a transaction on “Computer One?” > > If a session begins a transaction (for example, with START TRANSACTION), an implicit UNLOCK > TABLES is performed, which causes existing locks to be released. (For additional information about > the interaction between table locking and transactions, see Section 14.3.5.1, “Interaction of > Table Locking and Transactions”.) > > It could also be a question of whether the connection is being recreated between when you issue > the LOCK and when you do whatever work. > > If the connection for a client session terminates, whether normally or abnormally, the server > implicitly releases all table locks held by the session (transactional and nontransactional). > > Both the above are from: > http://dev.mysql.com/doc/refman/5.7/en/lock-tables.html > > I'd encourage you to test the functionality you're expecting from a MySQL prompt > instead of another language to confirm if you're operating with the correct queries or if the > problem lays in the interface layer. > > —jk Joshua: Much of what you say, I have already read and know. However, I can’t confirm because I can’t get LOCKs to work. For example, when I am using two different scripts to edit the exact same table, I see no changes in their respective session IDs when a LOCK is implemented. But then again my LOCKs don’t work. Additionally, Transactions may provide a implicit LOCK, but the BEGIN without a COMMIT/ROLLBACK does not LOCK the table. But then again my LOCKs don’t work. Do you see what I mean? It would be nice if someone could show me a “simple” example of LOCKs working that I could review (i.e., copy). You further state: > I'd encourage you to test the functionality you're expecting from a MySQL prompt > instead of another language to confirm if you're operating with the correct queries or if the > problem lays in the interface layer. While I understand what you are advising, my problem is having PHP do this. I really don’t care if it can be done via a MYSQL prompt because that is not my medium. The only thing that a MYSQL prompt could do, is show me it can’t be done in PHP. Either PHP can connect to a database and send queries or it can not. I believe the former. Cheers, tedd _______________ tedd sperling tedd.sperling@gmail.com

« previous php.general (#325856) next »