diff options
author | heikki@donna.mysql.fi <> | 2001-11-19 13:11:37 +0200 |
---|---|---|
committer | heikki@donna.mysql.fi <> | 2001-11-19 13:11:37 +0200 |
commit | 365bd6eb6ef24b7a927651111fb724166ba77062 (patch) | |
tree | 5c10d42cd48df29568f17396b28bbd2d0a8237f7 /innobase | |
parent | fb1f8c4f0a6f5df43d033b52d8d804cd540cb43c (diff) | |
download | mariadb-git-365bd6eb6ef24b7a927651111fb724166ba77062.tar.gz |
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); + } } } } |