mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
branches/zip: Improve the clearing of deleted records. Try to support
operations on BLOB columns. There are some bugs in the code, because test-insert and a few other tests fail. page_mem_free(): Add parameter index. Decrement PAGE_N_RECS here. Move some operations to page_zip_dir_delete(). page_zip_clear_rec(): Make this a static function. page_zip_dir_delete(): Add parameters index and offsets. Decrement PAGE_N_RECS and clear info_bits and n_owned. page_zip_get_n_prev_extern(): Correct the synopsis and the algorithm. Add parameter page_zip. Search the records in heap_no order instead of collation order. page_zip_compress(), page_zip_decompress(): Only copy BLOB pointers and increment n_blobs for records that have not been deleted. page_zip_clear_rec(): Clear trx_id and roll_ptr on the compressed page. page_zip_dir_delete(): Decrement PAGE_N_RECS. Shift the array of BLOB pointers. Call page_zip_clear_rec(). page_zip_dir_add_slot(): Shift the array of BLOB pointers to make space of roll_ptr and trx_id. page_cur_delete_rec(): Do not decrement PAGE_N_RECS or call page_zip_clear_rec(), as page_mem_free() already does it.
This commit is contained in:
@@ -53,19 +53,6 @@ page_zip_write(
|
||||
ulint length) /* in: length of the data */
|
||||
__attribute__((nonnull));
|
||||
|
||||
/**************************************************************************
|
||||
Clear a record on the uncompressed and compressed page, if possible. */
|
||||
|
||||
void
|
||||
page_zip_clear_rec(
|
||||
/*===============*/
|
||||
page_zip_des_t* page_zip,/* in/out: compressed page */
|
||||
byte* rec, /* in: record to clear */
|
||||
dict_index_t* index, /* in: index of rec */
|
||||
const ulint* offsets,/* in: rec_get_offsets(rec, index) */
|
||||
mtr_t* mtr) /* in: mini-transaction */
|
||||
__attribute__((nonnull));
|
||||
|
||||
/**************************************************************************
|
||||
Write data to the uncompressed header portion of a page. The data must
|
||||
already have been written to the uncompressed page. */
|
||||
@@ -110,9 +97,11 @@ void
|
||||
page_zip_dir_delete(
|
||||
/*================*/
|
||||
page_zip_des_t* page_zip,/* in/out: compressed page */
|
||||
const byte* rec, /* in: deleted record */
|
||||
byte* rec, /* in: deleted record */
|
||||
dict_index_t* index, /* in: index of rec */
|
||||
const ulint* offsets,/* in: rec_get_offsets(rec) */
|
||||
const byte* free) /* in: previous start of the free list */
|
||||
__attribute__((nonnull(1,2)));
|
||||
__attribute__((nonnull(1,2,3,4)));
|
||||
|
||||
/**************************************************************************
|
||||
Add a slot to the dense page directory. */
|
||||
|
||||
Reference in New Issue
Block a user