Commit f644f6af authored by marko's avatar marko

branches/zip: Introduce UNIV_ZIP_COPY for invoking page_zip_copy_recs()

more often in B-tree operations.
parent 05c33d6d
...@@ -1177,7 +1177,11 @@ btr_root_raise_and_insert( ...@@ -1177,7 +1177,11 @@ btr_root_raise_and_insert(
/* Copy the records from root to the new page one by one. */ /* Copy the records from root to the new page one by one. */
if (UNIV_UNLIKELY if (0
#ifdef UNIV_ZIP_COPY
|| new_page_zip
#endif /* UNIV_ZIP_COPY */
|| UNIV_UNLIKELY
(!page_copy_rec_list_end(new_block, root_block, (!page_copy_rec_list_end(new_block, root_block,
page_get_infimum_rec(root), page_get_infimum_rec(root),
index, mtr))) { index, mtr))) {
...@@ -1947,7 +1951,11 @@ btr_page_split_and_insert( ...@@ -1947,7 +1951,11 @@ btr_page_split_and_insert(
if (direction == FSP_DOWN) { if (direction == FSP_DOWN) {
/* fputs("Split left\n", stderr); */ /* fputs("Split left\n", stderr); */
if (UNIV_UNLIKELY if (0
#ifdef UNIV_ZIP_COPY
|| page_zip
#endif /* UNIV_ZIP_COPY */
|| UNIV_UNLIKELY
(!page_move_rec_list_start(new_block, block, move_limit, (!page_move_rec_list_start(new_block, block, move_limit,
cursor->index, mtr))) { cursor->index, mtr))) {
/* For some reason, compressing new_page failed, /* For some reason, compressing new_page failed,
...@@ -1986,7 +1994,11 @@ btr_page_split_and_insert( ...@@ -1986,7 +1994,11 @@ btr_page_split_and_insert(
} else { } else {
/* fputs("Split right\n", stderr); */ /* fputs("Split right\n", stderr); */
if (UNIV_UNLIKELY if (0
#ifdef UNIV_ZIP_COPY
|| page_zip
#endif /* UNIV_ZIP_COPY */
|| UNIV_UNLIKELY
(!page_move_rec_list_end(new_block, block, move_limit, (!page_move_rec_list_end(new_block, block, move_limit,
cursor->index, mtr))) { cursor->index, mtr))) {
/* For some reason, compressing new_page failed, /* For some reason, compressing new_page failed,
...@@ -2359,7 +2371,11 @@ btr_lift_page_up( ...@@ -2359,7 +2371,11 @@ btr_lift_page_up(
btr_page_set_level(father_page, father_page_zip, page_level, mtr); btr_page_set_level(father_page, father_page_zip, page_level, mtr);
/* Copy the records to the father page one by one. */ /* Copy the records to the father page one by one. */
if (UNIV_UNLIKELY if (0
#ifdef UNIV_ZIP_COPY
|| father_page_zip
#endif /* UNIV_ZIP_COPY */
|| UNIV_UNLIKELY
(!page_copy_rec_list_end(father_block, block, (!page_copy_rec_list_end(father_block, block,
page_get_infimum_rec(page), page_get_infimum_rec(page),
index, mtr))) { index, mtr))) {
......
...@@ -158,6 +158,8 @@ operations (very slow); also UNIV_DEBUG must be defined */ ...@@ -158,6 +158,8 @@ operations (very slow); also UNIV_DEBUG must be defined */
printing B-trees */ printing B-trees */
#define UNIV_ZIP_DEBUG /* extensive consistency checks #define UNIV_ZIP_DEBUG /* extensive consistency checks
for compressed pages */ for compressed pages */
#define UNIV_ZIP_COPY /* call page_zip_copy_recs()
more often */
#endif #endif
#define UNIV_BTR_DEBUG /* check B-tree links */ #define UNIV_BTR_DEBUG /* check B-tree links */
......
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