Commit db361837 authored by marko's avatar marko

branches/zip: dict_truncate_index_tree(): When the index is not found in

the data dictionary cache, do not create the index tree.
parent 1561b414
......@@ -821,24 +821,22 @@ dict_truncate_index_tree(
index;
index = UT_LIST_GET_NEXT(indexes, index)) {
if (!ut_dulint_cmp(index->id, index_id)) {
break;
root_page_no = btr_create(type, space, zip_size,
index_id, index, mtr);
index->page = (unsigned int) root_page_no;
return(root_page_no);
}
}
root_page_no = btr_create(type, space, zip_size, index_id, index, mtr);
if (index) {
index->page = (unsigned int) root_page_no;
} else {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Index %lu %lu of table %s is missing\n"
"InnoDB: from the data dictionary during TRUNCATE!\n",
ut_dulint_get_high(index_id),
ut_dulint_get_low(index_id),
table->name);
}
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Index %lu %lu of table %s is missing\n"
"InnoDB: from the data dictionary during TRUNCATE!\n",
ut_dulint_get_high(index_id),
ut_dulint_get_low(index_id),
table->name);
return(root_page_no);
return(FIL_NULL);
}
/*************************************************************************
......
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