1. 19 Jan, 2007 1 commit
    • marko's avatar
      branches/zip: Fix a bug in the buddy allocator. · 9ef14edb
      marko authored
      buf_buddy_relocate_block(): New function, split from buf_buddy_relocate().
      Return FALSE when buf_page_can_relocate() returns FALSE.
      
      Fix some formatting in buf_buddy_free_low() and buf_page_init_for_read().
      9ef14edb
  2. 18 Jan, 2007 8 commits
  3. 17 Jan, 2007 1 commit
    • marko's avatar
      branches/zip: btr_copy_externally_stored_field_prefix_low(): · ccbb93c0
      marko authored
      Split the code to subroutines.
      
      btr_copy_blob_prefix(): New function: copy the prefix of the externally
      stored part of an uncompressed BLOB.
      
      btr_copy_zblob_prefix(): New function: copy the prefix of the externally
      stored part of a compressed BLOB.
      
      btr_blob_get_part_len(), btr_blob_get_next_page_no(): Add const qualifier
      to the parameter.
      ccbb93c0
  4. 16 Jan, 2007 13 commits
  5. 15 Jan, 2007 1 commit
    • marko's avatar
      branches/zip: When adding a page to the buffer pool, add it to · 66049435
      marko authored
      buf_pool->page_hash and buf_pool->LRU before releasing buf_pool->mutex.
      
      buf_page_init_for_read(), buf_page_create(): Allocate the compressed
      page after the block has been added to the buffer pool.  Document the
      reason for this.
      66049435
  6. 14 Jan, 2007 1 commit
  7. 13 Jan, 2007 1 commit
  8. 12 Jan, 2007 6 commits
    • marko's avatar
      branches/zip: Improve Valgrind diagnostics. · 6df0fc42
      marko authored
      buf_buddy_relocate(): Document that src may have been split and some of
      it may be in buf_pool->zip_free[j] for some j<i, thus mach_read_from_4()
      may be reading from free memory.  Check buffer pages only for addressability,
      not for being completely initialized.  Ensure that block descriptors are
      completely initialized.
      
      buf_buddy_remove_from_free(): Check prev->state and next->state in
      UNIV_DEBUG && UNIV_DEBUG_VALGRIND builds.
      
      buf_buddy_free_low(): Flag the entire block valid prior to invoking
      buf_buddy_remove_from_free() in order to avoid a Valgrind warning about
      the debug assertion on bpage->state.  Remove the Valgrind check for
      buddy being completely allocated.  If it has been split to smaller blocks,
      some of those blocks may be free.
      6df0fc42
    • marko's avatar
      branches/zip: trx_sys_create_doublewrite_buf(): Revert the change of r1208. · 1e07a36b
      marko authored
      We cannot clear the page with memset(), because the page number and
      tablespace id have already been stamped on it.
      1e07a36b
    • marko's avatar
      5559afc6
    • marko's avatar
      branches/zip: Add the buf_pool->zip_free[] accessor functions · 1ca38a94
      marko authored
      buf_buddy_add_to_free() and buf_buddy_remove_from_free().
      Remove some bogus Valgrind warnings.  Improve Valgrind instrumentation.
      1ca38a94
    • marko's avatar
      branches/zip: Improve Valgrind instrumentation of allocated memory. · 2b82ae8c
      marko authored
      UNIV_MEM_FREE(): Declare a memory area free.
      UNIV_MEM_ALLOC(): Declare a memory area allocated (but uninitialized).
      UNIV_MEM_DESC(): Associate a memory area with a control block.
      UNIV_MEM_UNDESC(): Unassociate a control block.
      
      trx_sys_create_doublewrite_buf(): Clear the buffer with memset().
      
      buf_page_init(): Add a bogus UNIV_MEM_VALID(block->frame) to silence
      valid warnings about InnoDB data pages containing uninitialized data.
      
      buf_LRU_get_free_only(): Add UNIV_MEM_ALLOC(block->frame).
      
      buf_LRU_get_free_block(): Add UNIV_MEM_DESC(block->page.zip.data, block).
      
      buf_LRU_free_block(): Add UNIV_MEM_DESC(b->zip.data, b) when allocating
      a compressed-only control block for a compressed page.
      
      buf_LRU_block_free_non_file_page(): Replace UNIV_MEM_INVALID() with
      UNIV_MEM_FREE().
      
      buf_LRU_block_remove_hashed_page(): Add UNIV_MEM_UNDESC(bpage) when
      deallocating a compressed-only control block.  Add
      UNIV_MEM_INVALID(block->frame).  (The frame should be flagged free
      by buf_LRU_block_free_non_file_page() moments later.)
      
      buf0buddy.c: Disable some extra checks in Valgrind-instrumented builds.
      Add UNIV_MEM_VALID(), UNIV_MEM_INVALID(), UNIV_MEM_FREE(), UNIV_MEM_ALLOC()
      as necessary.
      2b82ae8c
    • marko's avatar
      branches/zip: buf_relocate(): Copy the block. Invalidate the source block. · 9478ec03
      marko authored
      buf_buddy_block_free(), buf_buddy_free_low(): Flag the freed bytes
      uninitialized.
      
      buf_page_init_for_read(), buf_buddy_relocate(): Do not refer to bpage
      after invoking buf_relocate().
      
      buf_buddy_relocate(): Flag src uninitialized.
      9478ec03
  9. 10 Jan, 2007 4 commits
  10. 09 Jan, 2007 4 commits