Opposite of LOCK

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

Opposite of LOCK

От:
Antti Linno <alligator@all.ee>
Дата:
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 transaction ends.


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 <tgl@sss.pgh.pa.us>
Дата:
Antti Linno  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

FAQ