From 229d9019213f9ca8948d2383f90f849b74ed923f Mon Sep 17 00:00:00 2001 From: marko Date: Thu, 30 Nov 2006 15:25:52 +0000 Subject: [PATCH] branches/zip: Fix compilation errors when UNIV_HOTBACKUP is defined. --- buf/buf0buf.c | 8 ++++---- dict/dict0crea.c | 4 +++- dict/dict0dict.c | 2 +- include/dict0crea.h | 3 ++- include/row0mysql.h | 2 ++ log/log0recv.c | 4 ++-- row/row0mysql.c | 10 ++++++---- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/buf/buf0buf.c b/buf/buf0buf.c index d7196e53303..cd4d2732e00 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -1769,7 +1769,7 @@ buf_page_init_for_backup_restore( block->lock_hash_val = 0; - block->freed_page_clock = 0; + block->page.freed_page_clock = 0; block->page.newest_modification = 0; block->page.oldest_modification = 0; @@ -1784,15 +1784,15 @@ buf_page_init_for_backup_restore( block->n_fields = 1; block->n_bytes = 0; block->left_side = TRUE; - page_zip_des_init(&block->page); + page_zip_des_init(&block->page.zip); /* We assume that block->page.data has been allocated with zip_size == UNIV_PAGE_SIZE. */ ut_ad(zip_size <= UNIV_PAGE_SIZE); ut_ad(ut_is_2pow(zip_size)); - block->page.size = zip_size; + page_zip_set_size(&block->page.zip, zip_size); #ifdef UNIV_DEBUG_FILE_ACCESSES - block->file_page_was_freed = FALSE; + block->page.file_page_was_freed = FALSE; #endif /* UNIV_DEBUG_FILE_ACCESSES */ } #endif /* UNIV_HOTBACKUP */ diff --git a/dict/dict0crea.c b/dict/dict0crea.c index 7315ce8c0ac..3048c9ea0f8 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -1144,6 +1144,7 @@ function_exit: return(thr); } +#ifndef UNIV_HOTBACKUP /******************************************************************** Creates the foreign key constraints system tables inside InnoDB at database creation or database start if they are not found or are @@ -1267,7 +1268,7 @@ dict_create_or_check_foreign_constraint_tables(void) /******************************************************************** Evaluate the given foreign key SQL statement. */ - +static ulint dict_foreign_eval_sql( /*==================*/ @@ -1490,3 +1491,4 @@ dict_create_add_foreigns_to_dictionary( return(DB_SUCCESS); } +#endif /* !UNIV_HOTBACKUP */ diff --git a/dict/dict0dict.c b/dict/dict0dict.c index f7fb3a451cd..a36da9e2d6e 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -1961,6 +1961,7 @@ dict_foreign_remove_from_cache( dict_foreign_free(foreign); } +#ifndef UNIV_HOTBACKUP /************************************************************************** Looks for the foreign constraint from the foreign and referenced lists of a table. */ @@ -2003,7 +2004,6 @@ dict_foreign_find( return(NULL); } -#ifndef UNIV_HOTBACKUP /************************************************************************* Tries to find an index whose first fields are the columns in the array, in the same order. */ diff --git a/include/dict0crea.h b/include/dict0crea.h index 749aebcc138..cfb85a18764 100644 --- a/include/dict0crea.h +++ b/include/dict0crea.h @@ -78,6 +78,7 @@ dict_drop_index_tree( rec_t* rec, /* in/out: record in the clustered index of SYS_INDEXES table */ mtr_t* mtr); /* in: mtr having the latch on the record page */ +#ifndef UNIV_HOTBACKUP /******************************************************************** Creates the foreign key constraints system tables inside InnoDB at database creation or database start if they are not found or are @@ -109,7 +110,7 @@ dict_create_add_foreigns_to_dictionary( was generated here */ dict_table_t* table, /* in: table */ trx_t* trx); /* in: transaction */ - +#endif /* !UNIV_HOTBACKUP */ /* Table create node structure */ diff --git a/include/row0mysql.h b/include/row0mysql.h index be285037767..5763fad0130 100644 --- a/include/row0mysql.h +++ b/include/row0mysql.h @@ -316,6 +316,7 @@ void row_mysql_unfreeze_data_dictionary( /*===============================*/ trx_t* trx); /* in: transaction */ +#ifndef UNIV_HOTBACKUP /************************************************************************* Does a table creation operation for MySQL. If the name of the created table ends to characters INNODB_MONITOR, then this also starts @@ -458,6 +459,7 @@ row_check_table_for_mysql( /* out: DB_ERROR or DB_SUCCESS */ row_prebuilt_t* prebuilt); /* in: prebuilt struct in MySQL handle */ +#endif /* !UNIV_HOTBACKUP */ /* A struct describing a place for an individual column in the MySQL row format which is presented to the table handler in ha_innobase. diff --git a/log/log0recv.c b/log/log0recv.c index 706a8b5b6ea..d83f62d3cc6 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -1631,7 +1631,7 @@ recv_apply_log_recs_for_backup(void) error = fil_io(OS_FILE_READ, TRUE, recv_addr->space, zip_size, recv_addr->page_no, 0, zip_size, - block->page_zip.data, NULL); + block->page.zip.data, NULL); } else { error = fil_io(OS_FILE_READ, TRUE, recv_addr->space, 0, @@ -1666,7 +1666,7 @@ recv_apply_log_recs_for_backup(void) recv_addr->space, zip_size, recv_addr->page_no, 0, zip_size, - block->page_zip.data, NULL); + block->page.zip.data, NULL); } else { error = fil_io(OS_FILE_WRITE, TRUE, recv_addr->space, 0, diff --git a/row/row0mysql.c b/row/row0mysql.c index a36b924bbeb..7791283b26f 100644 --- a/row/row0mysql.c +++ b/row/row0mysql.c @@ -54,6 +54,7 @@ static const char S_innodb_tablespace_monitor[] = "innodb_tablespace_monitor"; static const char S_innodb_table_monitor[] = "innodb_table_monitor"; static const char S_innodb_mem_validate[] = "innodb_mem_validate"; +#ifndef UNIV_HOTBACKUP /*********************************************************************** Determine if the given name is a name reserved for MySQL system tables. */ static @@ -73,6 +74,7 @@ row_mysql_is_system_table( || 0 == strcmp(name + 6, "user") || 0 == strcmp(name + 6, "db")); } +#endif /* !UNIV_HOTBACKUP */ /*********************************************************************** Delays an INSERT, DELETE or UPDATE operation if the purge is lagging. */ @@ -1717,6 +1719,7 @@ row_mysql_unlock_data_dictionary( trx->dict_operation_lock_mode = 0; } +#ifndef UNIV_HOTBACKUP /************************************************************************* Does a table creation operation for MySQL. If the name of the table to be created is equal with one of the predefined magic table names, @@ -2087,12 +2090,12 @@ row_table_add_foreign_constraints( err = dict_create_foreign_constraints(trx, sql_string, name, reject_fks); - +#ifndef UNIV_HOTBACKUP if (err == DB_SUCCESS) { /* Check that also referencing constraints are ok */ err = dict_load_foreigns(name, TRUE); } - +#endif /* !UNIV_HOTBACKUP */ if (err != DB_SUCCESS) { /* We have special error handling here */ @@ -2306,7 +2309,6 @@ row_add_table_to_background_drop_list( return(TRUE); } -#ifndef UNIV_HOTBACKUP /************************************************************************* Discards the tablespace of a table which stored in an .ibd file. Discarding means that this function deletes the .ibd file and assigns a new table id for @@ -2904,7 +2906,6 @@ funct_exit: return((int) err); } -#endif /* !UNIV_HOTBACKUP */ /************************************************************************* Drops a table for MySQL. If the name of the table to be dropped is equal @@ -4054,3 +4055,4 @@ row_check_table_for_mysql( return(ret); } +#endif /* !UNIV_HOTBACKUP */