Commit b8c51944 authored by marko's avatar marko

branches/zip: page_zip_rec_needs_ext(): Fix a bug that was introduced

in the fix of Mantis issue #73.  With key_block_size=16, we will also
have to check the available space on the uncompressed page.
Otherwise, the clustered index record can be almost 16 kilobytes in
size, and the undo log record will not fit.
parent 49589d0a
......@@ -168,9 +168,11 @@ page_zip_rec_needs_ext(
the dense page directory for every record. But there
is no record header. There should be enough room for
one record on an empty leaf page. Subtract 1 byte for
the encoded heap number. */
the encoded heap number. Check also the available space
on the uncompressed page. */
return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2)
>= (page_zip_empty_size(n_fields, zip_size) - 1));
>= (page_zip_empty_size(n_fields, zip_size) - 1)
|| rec_size >= page_get_free_space_of_empty(TRUE) / 2);
}
return(rec_size >= page_get_free_space_of_empty(comp) / 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment