Skip to content
  • Mauritz Sundell's avatar
    6b34a0b5
    Bug#29704420 Fix free list guaranteed sizes and faulty asserts. · 6b34a0b5
    Mauritz Sundell authored
    
    
    Problem
    =======
    
    After adding support of 30'000 byte rows one assert was not updated.
    
    The faulty assert was inn Dbtup::shrink_tuple():
    
      ndbassert((char*)dst_ptr <= ((char*)ptr) + 14140)
    
    The assert was actually also wrong with the old 14'000 byte rows.
    
    The size asserted should be not be greater than the maximal internal
    representation of row in Dbtup as an expanded tuple.
    
    Another faulty assert was found in Dbtup::calculate_free_list_for_alloc():
    
      ndbassert(alloc_size <= MAX_TUPLE_SIZE_IN_WORDS);
    
    Which also should check against the biggest expanded tuple size.
    And that size should also be the guaranteed minimum size in the last free
    list of varpages.
    
    Solution
    ========
    
    The asserts were corrected and the minimal size of last free list was set
    to the new constant MAX_EXPANDED_TUPLE_SIZE_IN_WORDS.
    
    Reviewed-by: default avatarMikael Ronström <mikael.ronstrom@oracle.com>
    6b34a0b5
    Bug#29704420 Fix free list guaranteed sizes and faulty asserts.
    Mauritz Sundell authored
    
    
    Problem
    =======
    
    After adding support of 30'000 byte rows one assert was not updated.
    
    The faulty assert was inn Dbtup::shrink_tuple():
    
      ndbassert((char*)dst_ptr <= ((char*)ptr) + 14140)
    
    The assert was actually also wrong with the old 14'000 byte rows.
    
    The size asserted should be not be greater than the maximal internal
    representation of row in Dbtup as an expanded tuple.
    
    Another faulty assert was found in Dbtup::calculate_free_list_for_alloc():
    
      ndbassert(alloc_size <= MAX_TUPLE_SIZE_IN_WORDS);
    
    Which also should check against the biggest expanded tuple size.
    And that size should also be the guaranteed minimum size in the last free
    list of varpages.
    
    Solution
    ========
    
    The asserts were corrected and the minimal size of last free list was set
    to the new constant MAX_EXPANDED_TUPLE_SIZE_IN_WORDS.
    
    Reviewed-by: default avatarMikael Ronström <mikael.ronstrom@oracle.com>
Loading