summaryrefslogtreecommitdiff
path: root/storage/myisammrg
diff options
context:
space:
mode:
authorunknown <Kristofer.Pettersson@naruto.>2006-09-20 07:40:56 +0200
committerunknown <Kristofer.Pettersson@naruto.>2006-09-20 07:40:56 +0200
commitb5b7840bdf358bb04512c382df796c9fde975408 (patch)
treeffc0ac8835c6953887642cd1c679c60b4b888b48 /storage/myisammrg
parent357a222d50f7dc9a0919aa8e92e7e58e3b1937a0 (diff)
parent18edc55b83a2b9fb4ac6e36c88f86825c207b55f (diff)
downloadmariadb-git-b5b7840bdf358bb04512c382df796c9fde975408.tar.gz
Merge naruto.:C:/cpp/bug20789/my50-bug20789
into naruto.:C:/cpp/bug20789/my51-bug20789 storage/myisam/mi_locking.c: Auto merged storage/myisam/myisamdef.h: Auto merged storage/myisammrg/myrg_locking.c: Auto merged
Diffstat (limited to 'storage/myisammrg')
-rw-r--r--storage/myisammrg/myrg_locking.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/storage/myisammrg/myrg_locking.c b/storage/myisammrg/myrg_locking.c
index e5a8d3f3d9d..98e8305b9ce 100644
--- a/storage/myisammrg/myrg_locking.c
+++ b/storage/myisammrg/myrg_locking.c
@@ -26,8 +26,19 @@ int myrg_lock_database(MYRG_INFO *info, int lock_type)
MYRG_TABLE *file;
error=0;
- for (file=info->open_tables ; file != info->end_table ; file++)
+ for (file=info->open_tables ; file != info->end_table ; file++)
+ {
+#ifdef __WIN__
+ /*
+ Make sure this table is marked as owned by a merge table.
+ The semaphore is never released as long as table remains
+ in memory. This should be refactored into a more generic
+ approach (observer pattern)
+ */
+ (file->table)->owned_by_merge = TRUE;
+#endif
if ((new_error=mi_lock_database(file->table,lock_type)))
error=new_error;
+ }
return(error);
}