summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-06-20 20:02:20 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-06-22 12:05:36 +0000
commitba9daddcd831e04be59bf1d60cb666624642f07c (patch)
tree519f02eb76a2250c6757cc9d9c2aef85517bfe36
parentf1a6d24af3f78ffd4441522b7352ab36f37b6b24 (diff)
downloadmariadb-git-ba9daddcd831e04be59bf1d60cb666624642f07c.tar.gz
Cherrypick Perconas fix for leaking descriptors with new xbstream.
https://github.com/percona/percona-xtrabackup/pull/368/commits/72c55f4fc2ba9ede7b960eceb01261ccc339c041
-rw-r--r--extra/mariabackup/xbstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extra/mariabackup/xbstream.c b/extra/mariabackup/xbstream.c
index edfe20a9e3c..f3880f9ec03 100644
--- a/extra/mariabackup/xbstream.c
+++ b/extra/mariabackup/xbstream.c
@@ -444,7 +444,11 @@ extract_worker_thread_func(void *arg)
}
if (chunk.type == XB_CHUNK_TYPE_EOF) {
+ pthread_mutex_lock(ctxt->mutex);
pthread_mutex_unlock(&entry->mutex);
+ my_hash_delete(ctxt->filehash, (uchar *) entry);
+ pthread_mutex_unlock(ctxt->mutex);
+
continue;
}