Commit 2453a49a authored by vasil's avatar vasil

branches/zip:

Fix Mantis issue#61:

In row_undo_ins_parse_undo_rec(): if we find that a table has no indexes
(dict_table_get_first_index() returns NULL) do not try to call
trx_undo_rec_get_row_ref() with a NULL pointer because that would lead to
a crash. Instead, print a warning and set node->table to NULL just like
it is done if the .ibd file is missing.

Approved by:	Heikki (via IM)
parent bb4b3f40
......@@ -228,7 +228,7 @@ static
void
row_undo_ins_parse_undo_rec(
/*========================*/
undo_node_t* node) /* in: row undo node */
undo_node_t* node) /* in/out: row undo node */
{
dict_index_t* clust_index;
byte* ptr;
......@@ -255,8 +255,15 @@ row_undo_ins_parse_undo_rec(
} else {
clust_index = dict_table_get_first_index(node->table);
ptr = trx_undo_rec_get_row_ref(
ptr, clust_index, &node->ref, node->heap);
if (clust_index != NULL) {
ptr = trx_undo_rec_get_row_ref(
ptr, clust_index, &node->ref, node->heap);
} else {
ut_print_timestamp(stderr);
fprintf(stderr, " InnoDB: table %s has no indexes, "
"ignoring the table\n", node->table->name);
node->table = 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