Обсуждение: Opposite of LOCK

Поиск
Список
Период
Сортировка

Opposite of LOCK

От
Antti Linno
Дата:
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

От
JanWieck@t-online.de (Jan Wieck)
Дата:
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

От
Tom Lane
Дата:
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