Ticket #3150: BPlusTree.cpp.patch

File BPlusTree.cpp.patch, 981 bytes (added by haxworx, 12 years ago)

A Patch a Patch my Kingdom for a Patch

  • (a) BPlusTree.cpp vs. (b) /boot/home/BPlusTree.cpp.new

    a b  
    649649        RETURN_ERROR(fStatus = B_IO_ERROR);
    650650
    651651    // is header valid?
    652 
    653     if (fHeader.MaximumSize() != stream->Size()) {
    654         dprintf("B+tree header size %" B_PRIdOFF " doesn't fit file size %"
    655             B_PRIdOFF "!\n", fHeader.MaximumSize(), stream->Size());
    656         // we can't change the header since we don't have a transaction
    657         //fHeader.maximum_size = HOST_ENDIAN_TO_BFS_INT64(stream->Size());
    658     }
    659652    if (!fHeader.IsValid()) {
     653        if (fHeader.MaximumSize() != stream->Size()) {
     654            dprintf("B+tree header size %" B_PRIdOFF " doesn't fit file size %"
     655                B_PRIdOFF "!\n", fHeader.MaximumSize(), stream->Size());
     656            // we can't change the header since we don't have a transaction
     657            //fHeader.maximum_size = HOST_ENDIAN_TO_BFS_INT64(stream->Size());
     658        }
    660659#ifdef DEBUG
    661660        dump_bplustree_header(&fHeader);
    662661        dump_block((const char*)&fHeader, 128);