diff options
author | unknown <heikki@donna.mysql.fi> | 2001-11-19 13:11:37 +0200 |
---|---|---|
committer | unknown <heikki@donna.mysql.fi> | 2001-11-19 13:11:37 +0200 |
commit | 689a55b1ad270391708bdff972f524ef9a9f79b5 (patch) | |
tree | 5c10d42cd48df29568f17396b28bbd2d0a8237f7 /innobase | |
parent | 421595c12e731bb50e6fe6f9985d950e023e4667 (diff) | |
download | mariadb-git-689a55b1ad270391708bdff972f524ef9a9f79b5.tar.gz |
srv0srv.c:
Fix a seg fault if a lock wait timeout is exceeded at the some time someone grants the lock
innobase/srv/srv0srv.c:
Fix a seg fault if a lock wait timeout is exceeded at the some time someone grants the lock
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/srv/srv0srv.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index bebb0b1f8ea..37bf59b6b9a 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -2144,10 +2144,14 @@ loop: /* Timeout exceeded or a wrap-around in system time counter: cancel the lock request queued by the transaction and release possible - other transactions waiting behind */ - - lock_cancel_waiting_and_release( - thr_get_trx(slot->thr)->wait_lock); + other transactions waiting behind; it is + possible that the lock has already been + granted: in that case do nothing */ + + if (thr_get_trx(slot->thr)->wait_lock) { + lock_cancel_waiting_and_release( + thr_get_trx(slot->thr)->wait_lock); + } } } } |