summaryrefslogtreecommitdiff
path: root/innobase/btr
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-12-08 14:33:09 +0200
committerunknown <marko@hundin.mysql.fi>2004-12-08 14:33:09 +0200
commitff2c115ba8f048a117f9b3d03bd16b5883087826 (patch)
tree0d1c003aea6202503deae16528af6dba7a5f95be /innobase/btr
parent22b16624d5170bd6cc985be7476dc58e5e721b07 (diff)
downloadmariadb-git-ff2c115ba8f048a117f9b3d03bd16b5883087826.tar.gz
row0mysql.c:
Remove parameter from call to btr_search_validate(). buf0buf.c: Initialize member "index" of buf_block_t. buf0buf.h: Add member "index" to buf_block_t. btr0sea.h: Remove parameter of btr_search_validate() btr0sea.c: Make use of the added member "index" of buf_block_t. innobase/btr/btr0sea.c: Make use of the added member "index" of buf_block_t. innobase/include/btr0sea.h: Remove parameter of btr_search_validate() innobase/include/buf0buf.h: Add member "index" to buf_block_t. innobase/buf/buf0buf.c: Initialize member "index" of buf_block_t. innobase/row/row0mysql.c: Remove parameter from call to btr_search_validate().
Diffstat (limited to 'innobase/btr')
-rw-r--r--innobase/btr/btr0sea.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index 40ccf56492f..468c5efd24d 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -411,6 +411,9 @@ btr_search_update_hash_ref(
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
|| rw_lock_own(&(block->lock), RW_LOCK_EX));
#endif /* UNIV_SYNC_DEBUG */
+ ut_ad(buf_block_align(btr_cur_get_rec(cursor)) == block);
+ ut_a(!block->is_hashed || block->index == cursor->index);
+
if (block->is_hashed
&& (info->n_hash_potential > 0)
&& (block->curr_n_fields == info->n_fields)
@@ -957,6 +960,7 @@ btr_search_drop_page_hash_index(
ha_remove_all_nodes_to_page(table, page);
block->is_hashed = FALSE;
+ block->index = NULL;
rw_lock_x_unlock(&btr_search_latch);
}
@@ -1170,6 +1174,7 @@ btr_search_build_page_hash_index(
block->curr_n_fields = n_fields;
block->curr_n_bytes = n_bytes;
block->curr_side = side;
+ block->index = index;
for (i = 0; i < n_cached; i++) {
@@ -1215,6 +1220,8 @@ btr_search_move_or_delete_hash_entries(
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
ut_ad(rw_lock_own(&(new_block->lock), RW_LOCK_EX));
#endif /* UNIV_SYNC_DEBUG */
+ ut_a(!new_block->is_hashed || new_block->index == index);
+ ut_a(!block->is_hashed || block->index == index);
rw_lock_s_lock(&btr_search_latch);
@@ -1284,6 +1291,7 @@ btr_search_update_hash_on_delete(
return;
}
+ ut_a(block->index == cursor->index);
ut_a(block->curr_n_fields + block->curr_n_bytes > 0);
table = btr_search_sys->hash_index;
@@ -1329,6 +1337,8 @@ btr_search_update_hash_node_on_insert(
return;
}
+ ut_a(block->index == cursor->index);
+
rw_lock_x_lock(&btr_search_latch);
if ((cursor->flag == BTR_CUR_HASH)
@@ -1394,6 +1404,8 @@ btr_search_update_hash_on_insert(
return;
}
+ ut_a(block->index == cursor->index);
+
tree_id = ((cursor->index)->tree)->id;
n_fields = block->curr_n_fields;
@@ -1499,10 +1511,9 @@ function_exit:
Validates the search system. */
ibool
-btr_search_validate(
-/*================*/
+btr_search_validate(void)
+/*=====================*/
/* out: TRUE if ok */
- dict_index_t* index) /* in: record descriptor */
{
buf_block_t* block;
page_t* page;
@@ -1521,8 +1532,9 @@ btr_search_validate(
while (node != NULL) {
block = buf_block_align(node->data);
page = buf_frame_align(node->data);
- offsets = rec_reget_offsets((rec_t*) node->data, index,
- offsets, block->curr_n_fields
+ offsets = rec_reget_offsets((rec_t*) node->data,
+ block->index, offsets,
+ block->curr_n_fields
+ (block->curr_n_bytes > 0), heap);
if (!block->is_hashed