From ac5135860dd0320edf4df3827944cfe07264884d Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Tue, 4 Mar 2003 14:05:23 +0200 Subject: [PATCH] buf0buf.c: Do not try to resolve the table name of a corrupt page if the code is in ibbackup, i.e., the dict system is not initialized --- innobase/buf/buf0buf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index c9a5ec5307f..bbce52f0b00 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -324,13 +324,21 @@ buf_page_print( ut_dulint_get_high(btr_page_get_index_id(read_buf)), ut_dulint_get_low(btr_page_get_index_id(read_buf))); - index = dict_index_find_on_id_low( + /* If the code is in ibbackup, dict_sys may be uninitialized, + i.e., NULL */ + + if (dict_sys != NULL) { + + index = dict_index_find_on_id_low( btr_page_get_index_id(read_buf)); - if (index) { - fprintf(stderr, "InnoDB: and table %s index %s\n", + if (index) { + fprintf(stderr, + "InnoDB: and table %s index %s\n", index->table_name, index->name); + } } + } else if (fil_page_get_type(read_buf) == FIL_PAGE_INODE) { fprintf(stderr, "InnoDB: Page may be an 'inode' page\n"); } else if (fil_page_get_type(read_buf) == FIL_PAGE_IBUF_FREE_LIST) {