summaryrefslogtreecommitdiff
path: root/storage/maria/ma_blockrec.h
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2007-12-15 14:17:23 +0100
committerunknown <guilhem@gbichot4.local>2007-12-15 14:17:23 +0100
commit1cc48d1629eee4f842c35966432703b8a11be94d (patch)
treea358d778f44f2aefd9e0ce7d9f8c18cbd560b210 /storage/maria/ma_blockrec.h
parent105ce5386de24394027940c6112e18894e8a62f6 (diff)
downloadmariadb-git-1cc48d1629eee4f842c35966432703b8a11be94d.tar.gz
WL#3072 Maria Recovery.
Updates to the bitmap flush/pin logic to prepare for when we support multiple writers. storage/maria/ma_bitmap.c: Read lock is less bad than write lock. Changing bitmap->flushable to a counter, to prepare for when multiple writers are allowed on a table. Using bitmap->flush_all_requested instead of share->in_checkpoint; the latter can be true for the time of a whole checkpoint even though the checkpoint is not yet handling our table, or has already handled it, so to decrease the number of broadcasts we use a dedicated my_bool which is true only when checkpoint is handling this table's bitmap. _ma_bitmap_flushable(share,+1) waits for a concurrent _ma_bitmap_flush_all() to finish before incrementing non_flushable; without this, with multiple writers there may always be one thread making the bitmap unflushable and thus checkpoint would stall. storage/maria/ma_blockrec.c: update to new prototype: "flushable is FALSE|TRUE" becomes "add 1|-1 to non_flushable". storage/maria/ma_blockrec.h: new prototype storage/maria/maria_def.h: MARIA_FILE_BITMAP::flushable becomes a counter. New MARIA_FILE_BITMAP::flush_all_requested.
Diffstat (limited to 'storage/maria/ma_blockrec.h')
-rw-r--r--storage/maria/ma_blockrec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h
index 5c0e41f9a1d..fc0ed6a6435 100644
--- a/storage/maria/ma_blockrec.h
+++ b/storage/maria/ma_blockrec.h
@@ -199,7 +199,7 @@ my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info,
uint *bitmap_pattern);
void _ma_bitmap_delete_all(MARIA_SHARE *share);
int _ma_bitmap_create_first(MARIA_SHARE *share);
-void _ma_bitmap_flushable(MARIA_SHARE *share, my_bool flushable);
+void _ma_bitmap_flushable(MARIA_SHARE *share, int non_flushable_inc);
#ifndef DBUG_OFF
void _ma_print_bitmap(MARIA_FILE_BITMAP *bitmap, uchar *data,
ulonglong page);