Commit 573a7a47 authored by marko's avatar marko

branches/zip: Clean up fast index creation.

merge_rec_list_t: Define n_records only #ifdef UNIV_DEBUG.
parent 01a6c8c4
...@@ -75,8 +75,10 @@ struct merge_rec_list_struct { ...@@ -75,8 +75,10 @@ struct merge_rec_list_struct {
list */ list */
merge_rec_t* tail; /* Pointer to tail of the merge_rec_t* tail; /* Pointer to tail of the
list */ list */
#ifdef UNIV_DEBUG
ulint n_records; /* Number of records in ulint n_records; /* Number of records in
the list */ the list */
#endif /* UNIV_DEBUG */
ulint total_size; /* Total size of all records in ulint total_size; /* Total size of all records in
the list */ the list */
mem_heap_t* heap; /* Heap where memory for this mem_heap_t* heap; /* Heap where memory for this
...@@ -734,7 +736,7 @@ row_merge_create_list(void) ...@@ -734,7 +736,7 @@ row_merge_create_list(void)
list_header->head = NULL; list_header->head = NULL;
list_header->tail = NULL; list_header->tail = NULL;
list_header->n_records = 0; ut_d(list_header->n_records = 0);
list_header->total_size = sizeof(merge_rec_list_t); list_header->total_size = sizeof(merge_rec_list_t);
list_header->heap = heap; list_header->heap = heap;
...@@ -765,7 +767,7 @@ row_merge_list_add( ...@@ -765,7 +767,7 @@ row_merge_list_add(
list_header->tail = m_rec; list_header->tail = m_rec;
} }
list_header->n_records++; ut_d(list_header->n_records++);
} }
/***************************************************************** /*****************************************************************
...@@ -809,7 +811,7 @@ row_merge_write_list_to_block( ...@@ -809,7 +811,7 @@ row_merge_write_list_to_block(
sec_offs, output, offset); sec_offs, output, offset);
m_rec = m_rec->next; m_rec = m_rec->next;
list->n_records--; ut_d(list->n_records--);
} }
/* Now create a new list and store rest of the records there. /* Now create a new list and store rest of the records there.
...@@ -1616,8 +1618,12 @@ next_record: ...@@ -1616,8 +1618,12 @@ next_record:
/* While we have items in the list write them /* While we have items in the list write them
to the block */ to the block */
ut_ad(!merge_list[idx_num]->head
== !merge_list[idx_num]->tail);
ut_ad(!merge_list[idx_num]->n_records
== !merge_list[idx_num]->head);
if (merge_list[idx_num]->n_records > 0) { if (merge_list[idx_num]->head) {
/* Next block will be written directly /* Next block will be written directly
behind this one. This will create a behind this one. This will create a
......
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