summaryrefslogtreecommitdiff
path: root/myisammrg
diff options
context:
space:
mode:
authorKristofer.Pettersson@naruto. <>2006-09-20 07:46:33 +0200
committerKristofer.Pettersson@naruto. <>2006-09-20 07:46:33 +0200
commit374e5e8a7e43eb30478aa78ef2fe17f47a71b80c (patch)
tree82aeb3a89fd533df47fcba82302ebe1221762174 /myisammrg
parent135f5bcddc7062a58b1657e8c3facffc6cb1917f (diff)
parent70316e06873e645e09da63a8eec7a48a9abde906 (diff)
downloadmariadb-git-374e5e8a7e43eb30478aa78ef2fe17f47a71b80c.tar.gz
Merge naruto.:C:/cpp/bug20789/my50-bug20789
into naruto.:C:/cpp/mysql-5.0-maint
Diffstat (limited to 'myisammrg')
-rw-r--r--myisammrg/myrg_locking.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/myisammrg/myrg_locking.c b/myisammrg/myrg_locking.c
index e5a8d3f3d9d..98e8305b9ce 100644
--- a/myisammrg/myrg_locking.c
+++ b/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);
}