Thread: Opposite of LOCK

Opposite of LOCK

From
Antti Linno
Date:
Is there any possibility to unlock tables after they've been locked? The
manual part of lock was fuzzy, so I ask from experts instead. MySQL
uses lock and unlock.
Antti.




Re: Opposite of LOCK

From
JanWieck@t-online.de (Jan Wieck)
Date:
Antti Linno wrote:
> Is there any possibility to unlock tables after they've been locked? The
> manual part of lock was fuzzy, so I ask from experts instead. MySQL
> uses lock and unlock.
   Yes, COMMIT/ROLLBACK.
   The transactional concept implies that you hold each lock you   accquired since transaction start until the
transactionends.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




Re: Opposite of LOCK

From
Tom Lane
Date:
Antti Linno <alligator@all.ee> writes:
> Is there any possibility to unlock tables after they've been locked? The
> manual part of lock was fuzzy, so I ask from experts instead. MySQL
> uses lock and unlock.

Locks are released at transaction commit/abort.  It has to be that way
to preserve transaction semantics.  I'll refrain from commenting about
MySQL's transaction support...
        regards, tom lane