summaryrefslogtreecommitdiff
path: root/innobase/ha/ha0ha.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/ha/ha0ha.c')
-rw-r--r--innobase/ha/ha0ha.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/innobase/ha/ha0ha.c b/innobase/ha/ha0ha.c
index ad1391ff83e..ab565acd64f 100644
--- a/innobase/ha/ha0ha.c
+++ b/innobase/ha/ha0ha.c
@@ -276,20 +276,26 @@ ha_remove_all_nodes_to_page(
}
/*****************************************************************
-Validates a hash table. */
+Validates a given range of the cells in hash table. */
ibool
ha_validate(
/*========*/
- /* out: TRUE if ok */
- hash_table_t* table) /* in: hash table */
+ /* out: TRUE if ok */
+ hash_table_t* table, /* in: hash table */
+ ulint start_index, /* in: start index */
+ ulint end_index) /* in: end index */
{
hash_cell_t* cell;
ha_node_t* node;
ibool ok = TRUE;
ulint i;
- for (i = 0; i < hash_get_n_cells(table); i++) {
+ ut_a(start_index <= end_index);
+ ut_a(start_index < hash_get_n_cells(table));
+ ut_a(end_index < hash_get_n_cells(table));
+
+ for (i = start_index; i <= end_index; i++) {
cell = hash_get_nth_cell(table, i);