• Michael Widenius's avatar
    Aria fixes: · 5bcf3a24
    Michael Widenius authored
    - Fixed a bug where we didn't signal a thread waiting for bitmap flush that it's now time to continue which caused a deadlock in Aria.
    - Fix for lp:700623 "Aria recovery: ma_blockrec.c:3930: _ma_update_at_original_place: Assertion `block->org_bitmap_value == _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)' failed"
    - Fixed a bug in pagecache where a block could change while it was in use.
    - In maria_chk set --update-state to on by default so that open_count is cleared if table was ok during check.
    
    storage/maria/ma_bitmap.c:
      Fixed a bug where we didn't signal a thread waiting for bitmap flush that it's now time to continue.
      This fix adds counters for the different conditions that may be waited upon and signals if there is a waiter when the condition changes.
    storage/maria/ma_blockrec.c:
      Check if directory if full when calculating what should be in the bitmap.
      Fixes lp:700623 "Aria recovery: ma_blockrec.c:3930: _ma_update_at_original_place: Assertion `block->org_bitmap_value == _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)' failed"
    storage/maria/ma_pagecache.c:
      Added more comments
      Removed some duplicated DBUG_PRINT and DBUG_ASSERT()
      find_block() now waits for block to be usable if we are not copying it directly. This fixes a bug where a block changed information while we where using it. Fixed by adding an extra parameter to find_block()
      Simplified code in make_lock_and_pin() as block can never be == 0 here.
    storage/maria/ma_recovery.c:
      Reset open_count for tables that are closed in middle of recovery.
    storage/maria/maria_chk.c:
      Set --update-state to on by default so that open_count is cleared if table was ok during check.
      Update time when table was recovered/checked if --update-state was used.
      Updated --help message with missing information.
    storage/maria/maria_def.h:
      Added wait counters
    5bcf3a24
ma_blockrec.c 243 KB