Commit 229d9019 authored by marko's avatar marko

branches/zip: Fix compilation errors when UNIV_HOTBACKUP is defined.

parent 6c0a4186
...@@ -1769,7 +1769,7 @@ buf_page_init_for_backup_restore( ...@@ -1769,7 +1769,7 @@ buf_page_init_for_backup_restore(
block->lock_hash_val = 0; block->lock_hash_val = 0;
block->freed_page_clock = 0; block->page.freed_page_clock = 0;
block->page.newest_modification = 0; block->page.newest_modification = 0;
block->page.oldest_modification = 0; block->page.oldest_modification = 0;
...@@ -1784,15 +1784,15 @@ buf_page_init_for_backup_restore( ...@@ -1784,15 +1784,15 @@ buf_page_init_for_backup_restore(
block->n_fields = 1; block->n_fields = 1;
block->n_bytes = 0; block->n_bytes = 0;
block->left_side = TRUE; 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 /* We assume that block->page.data has been allocated
with zip_size == UNIV_PAGE_SIZE. */ with zip_size == UNIV_PAGE_SIZE. */
ut_ad(zip_size <= UNIV_PAGE_SIZE); ut_ad(zip_size <= UNIV_PAGE_SIZE);
ut_ad(ut_is_2pow(zip_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 #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_DEBUG_FILE_ACCESSES */
} }
#endif /* UNIV_HOTBACKUP */ #endif /* UNIV_HOTBACKUP */
......
...@@ -1144,6 +1144,7 @@ function_exit: ...@@ -1144,6 +1144,7 @@ function_exit:
return(thr); return(thr);
} }
#ifndef UNIV_HOTBACKUP
/******************************************************************** /********************************************************************
Creates the foreign key constraints system tables inside InnoDB Creates the foreign key constraints system tables inside InnoDB
at database creation or database start if they are not found or are 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) ...@@ -1267,7 +1268,7 @@ dict_create_or_check_foreign_constraint_tables(void)
/******************************************************************** /********************************************************************
Evaluate the given foreign key SQL statement. */ Evaluate the given foreign key SQL statement. */
static
ulint ulint
dict_foreign_eval_sql( dict_foreign_eval_sql(
/*==================*/ /*==================*/
...@@ -1490,3 +1491,4 @@ dict_create_add_foreigns_to_dictionary( ...@@ -1490,3 +1491,4 @@ dict_create_add_foreigns_to_dictionary(
return(DB_SUCCESS); return(DB_SUCCESS);
} }
#endif /* !UNIV_HOTBACKUP */
...@@ -1961,6 +1961,7 @@ dict_foreign_remove_from_cache( ...@@ -1961,6 +1961,7 @@ dict_foreign_remove_from_cache(
dict_foreign_free(foreign); dict_foreign_free(foreign);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************** /**************************************************************************
Looks for the foreign constraint from the foreign and referenced lists Looks for the foreign constraint from the foreign and referenced lists
of a table. */ of a table. */
...@@ -2003,7 +2004,6 @@ dict_foreign_find( ...@@ -2003,7 +2004,6 @@ dict_foreign_find(
return(NULL); return(NULL);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Tries to find an index whose first fields are the columns in the array, Tries to find an index whose first fields are the columns in the array,
in the same order. */ in the same order. */
......
...@@ -78,6 +78,7 @@ dict_drop_index_tree( ...@@ -78,6 +78,7 @@ dict_drop_index_tree(
rec_t* rec, /* in/out: record in the clustered index rec_t* rec, /* in/out: record in the clustered index
of SYS_INDEXES table */ of SYS_INDEXES table */
mtr_t* mtr); /* in: mtr having the latch on the record page */ mtr_t* mtr); /* in: mtr having the latch on the record page */
#ifndef UNIV_HOTBACKUP
/******************************************************************** /********************************************************************
Creates the foreign key constraints system tables inside InnoDB Creates the foreign key constraints system tables inside InnoDB
at database creation or database start if they are not found or are at database creation or database start if they are not found or are
...@@ -109,7 +110,7 @@ dict_create_add_foreigns_to_dictionary( ...@@ -109,7 +110,7 @@ dict_create_add_foreigns_to_dictionary(
was generated here */ was generated here */
dict_table_t* table, /* in: table */ dict_table_t* table, /* in: table */
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
#endif /* !UNIV_HOTBACKUP */
/* Table create node structure */ /* Table create node structure */
......
...@@ -316,6 +316,7 @@ void ...@@ -316,6 +316,7 @@ void
row_mysql_unfreeze_data_dictionary( row_mysql_unfreeze_data_dictionary(
/*===============================*/ /*===============================*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Does a table creation operation for MySQL. If the name of the created Does a table creation operation for MySQL. If the name of the created
table ends to characters INNODB_MONITOR, then this also starts table ends to characters INNODB_MONITOR, then this also starts
...@@ -458,6 +459,7 @@ row_check_table_for_mysql( ...@@ -458,6 +459,7 @@ row_check_table_for_mysql(
/* out: DB_ERROR or DB_SUCCESS */ /* out: DB_ERROR or DB_SUCCESS */
row_prebuilt_t* prebuilt); /* in: prebuilt struct in MySQL row_prebuilt_t* prebuilt); /* in: prebuilt struct in MySQL
handle */ handle */
#endif /* !UNIV_HOTBACKUP */
/* A struct describing a place for an individual column in the MySQL /* A struct describing a place for an individual column in the MySQL
row format which is presented to the table handler in ha_innobase. row format which is presented to the table handler in ha_innobase.
......
...@@ -1631,7 +1631,7 @@ recv_apply_log_recs_for_backup(void) ...@@ -1631,7 +1631,7 @@ recv_apply_log_recs_for_backup(void)
error = fil_io(OS_FILE_READ, TRUE, error = fil_io(OS_FILE_READ, TRUE,
recv_addr->space, zip_size, recv_addr->space, zip_size,
recv_addr->page_no, 0, zip_size, recv_addr->page_no, 0, zip_size,
block->page_zip.data, NULL); block->page.zip.data, NULL);
} else { } else {
error = fil_io(OS_FILE_READ, TRUE, error = fil_io(OS_FILE_READ, TRUE,
recv_addr->space, 0, recv_addr->space, 0,
...@@ -1666,7 +1666,7 @@ recv_apply_log_recs_for_backup(void) ...@@ -1666,7 +1666,7 @@ recv_apply_log_recs_for_backup(void)
recv_addr->space, zip_size, recv_addr->space, zip_size,
recv_addr->page_no, 0, recv_addr->page_no, 0,
zip_size, zip_size,
block->page_zip.data, NULL); block->page.zip.data, NULL);
} else { } else {
error = fil_io(OS_FILE_WRITE, TRUE, error = fil_io(OS_FILE_WRITE, TRUE,
recv_addr->space, 0, recv_addr->space, 0,
......
...@@ -54,6 +54,7 @@ static const char S_innodb_tablespace_monitor[] = "innodb_tablespace_monitor"; ...@@ -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_table_monitor[] = "innodb_table_monitor";
static const char S_innodb_mem_validate[] = "innodb_mem_validate"; 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. */ Determine if the given name is a name reserved for MySQL system tables. */
static static
...@@ -73,6 +74,7 @@ row_mysql_is_system_table( ...@@ -73,6 +74,7 @@ row_mysql_is_system_table(
|| 0 == strcmp(name + 6, "user") || 0 == strcmp(name + 6, "user")
|| 0 == strcmp(name + 6, "db")); || 0 == strcmp(name + 6, "db"));
} }
#endif /* !UNIV_HOTBACKUP */
/*********************************************************************** /***********************************************************************
Delays an INSERT, DELETE or UPDATE operation if the purge is lagging. */ Delays an INSERT, DELETE or UPDATE operation if the purge is lagging. */
...@@ -1717,6 +1719,7 @@ row_mysql_unlock_data_dictionary( ...@@ -1717,6 +1719,7 @@ row_mysql_unlock_data_dictionary(
trx->dict_operation_lock_mode = 0; trx->dict_operation_lock_mode = 0;
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Does a table creation operation for MySQL. If the name of the table 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, to be created is equal with one of the predefined magic table names,
...@@ -2087,12 +2090,12 @@ row_table_add_foreign_constraints( ...@@ -2087,12 +2090,12 @@ row_table_add_foreign_constraints(
err = dict_create_foreign_constraints(trx, sql_string, name, err = dict_create_foreign_constraints(trx, sql_string, name,
reject_fks); reject_fks);
#ifndef UNIV_HOTBACKUP
if (err == DB_SUCCESS) { if (err == DB_SUCCESS) {
/* Check that also referencing constraints are ok */ /* Check that also referencing constraints are ok */
err = dict_load_foreigns(name, TRUE); err = dict_load_foreigns(name, TRUE);
} }
#endif /* !UNIV_HOTBACKUP */
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
/* We have special error handling here */ /* We have special error handling here */
...@@ -2306,7 +2309,6 @@ row_add_table_to_background_drop_list( ...@@ -2306,7 +2309,6 @@ row_add_table_to_background_drop_list(
return(TRUE); return(TRUE);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Discards the tablespace of a table which stored in an .ibd file. Discarding 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 means that this function deletes the .ibd file and assigns a new table id for
...@@ -2904,7 +2906,6 @@ funct_exit: ...@@ -2904,7 +2906,6 @@ funct_exit:
return((int) err); return((int) err);
} }
#endif /* !UNIV_HOTBACKUP */
/************************************************************************* /*************************************************************************
Drops a table for MySQL. If the name of the table to be dropped is equal 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( ...@@ -4054,3 +4055,4 @@ row_check_table_for_mysql(
return(ret); return(ret);
} }
#endif /* !UNIV_HOTBACKUP */
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