• Michael Widenius's avatar
    Aria fixes: · 3293a51b
    Michael Widenius authored
    - Fixed multi-user problem with one thread doing inserts and another doing scans that gave error 175
    - Fixed bug that caused assert in move_to_next_bitmap() & _ma_read_bitmap_page()
    - Much more DBUG_ASSERT(!maria_assert_if_crashed_table) to detect errors early
    - EXTERNAL_LOCKING -> MARIA_EXTERNAL_LOCKING (to use same define everywhere
    
    storage/maria/ma_bitmap.c:
      More secure handling of first_bitmap_with_space (now we also take care of wrong values)
      Don't set page to -1; This fixed unlikely bug that caused assert in move_to_next_bitmap() & _ma_read_bitmap_page()
    storage/maria/ma_blockrec.c:
      More DBUG_ASSERT()'s
      Fixed multi-user problem with one thread doing inserts and another doing scans that gave error 175
      (We should use data_file_length from start of scan, not new value as new bitmap page may not yet be in page cache)
    storage/maria/ma_check.c:
      EXTERNAL_LOCKING -> MARIA_EXTERNAL_LOCKING (to use same define everywhere)
    storage/maria/ma_checkpoint.c:
      Made maria_checkpoint_min_activity static so that one can change it in debugger while testing.
      Fixed long standing performance problem that caused write of state info at checkpoint for any file that was ever changed since open.
    storage/maria/ma_create.c:
      EXTERNAL_LOCKING -> MARIA_EXTERNAL_LOCKING (to use same define everywhere
    storage/maria/ma_dynrec.c:
      Added missing MARIA_EXTERNAL_LOCKING (minor performance improvement)
    storage/maria/ma_locking.c:
      EXTERNAL_LOCKING -> MARIA_EXTERNAL_LOCKING (to use same define everywhere
    storage/maria/ma_open.c:
      EXTERNAL_LOCKING -> MARIA_EXTERNAL_LOCKING (to use same define everywhere
    storage/maria/ma_pagecache.c:
      Added assert to detect reads outside of data file
    storage/maria/maria_def.h:
      Added checkpoint_state to cache state writes in checkpoint
    3293a51b
ma_checkpoint.c 45.8 KB