diff options
author | Michael Widenius <monty@mariadb.org> | 2015-01-18 20:38:07 +0200 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2015-01-18 20:38:07 +0200 |
commit | 7cb4a1c61f3327dbb86b6160ec2421bf827cea20 (patch) | |
tree | f7ae88366cc76b29399c1eb8cb41185e412ad4b1 /mysys/thr_lock.c | |
parent | 32be7dffbe7c9bf5c65210e2775e6e2d3d6d411e (diff) | |
download | mariadb-git-7cb4a1c61f3327dbb86b6160ec2421bf827cea20.tar.gz |
Fixed MDEV-7314: Deadlock when doing insert-select with Aria
mysql-test/suite/maria/insert_select.result:
Added test case
mysql-test/suite/maria/insert_select.test:
Added test case
mysys/thr_lock.c:
Ensure we don't allow concurrent_insert when a read_no_write lock is in use
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r-- | mysys/thr_lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 60e01974320..20af094f711 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -833,7 +833,8 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout) if (((lock_type == TL_WRITE_ALLOW_WRITE || (lock_type == TL_WRITE_CONCURRENT_INSERT && - lock->allow_multiple_concurrent_insert)) && + lock->allow_multiple_concurrent_insert && + !lock->read_no_write_count)) && ! lock->write_wait.data && lock->write.data->type == lock_type) || has_old_lock(lock->write.data, data->owner)) |