Commit 34909070 authored by marko's avatar marko

branches/zip: Remove references to UNIV_HOTBACKUP from files that are

not used when building InnoDB Hot Backup.  Declare
innobase_invalidate_query_cache() in ha_prototypes.h.
parent 62d80bad
......@@ -1156,7 +1156,6 @@ 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
......@@ -1500,4 +1499,3 @@ dict_create_add_foreigns_to_dictionary(
return(DB_SUCCESS);
}
#endif /* !UNIV_HOTBACKUP */
......@@ -24,9 +24,7 @@ Created 4/24/1996 Heikki Tuuri
*******************************************************/
#include "dict0load.h"
#ifndef UNIV_HOTBACKUP
#include "mysql_version.h"
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_NONINL
#include "dict0load.ic"
......@@ -960,7 +958,7 @@ err_exit:
mem_heap_empty(heap);
err = dict_load_indexes(table, heap);
#ifndef UNIV_HOTBACKUP
/* If the force recovery flag is set, we open the table irrespective
of the error condition, since the user may want to dump data from the
clustered index. However we load the foreign key information only if
......@@ -971,7 +969,7 @@ err_exit:
dict_table_remove_from_cache(table);
table = NULL;
}
# if 0
#if 0
if (err != DB_SUCCESS && table != NULL) {
mutex_enter(&dict_foreign_err_mutex);
......@@ -994,8 +992,7 @@ err_exit:
mutex_exit(&dict_foreign_err_mutex);
}
# endif /* 0 */
#endif /* !UNIV_HOTBACKUP */
#endif /* 0 */
mem_heap_free(heap);
return(table);
......@@ -1113,7 +1110,6 @@ dict_load_sys_table(
mem_heap_free(heap);
}
#ifndef UNIV_HOTBACKUP
/************************************************************************
Loads foreign key constraint col names (also for the referenced table). */
static
......@@ -1457,4 +1453,3 @@ load_next_index:
return(DB_SUCCESS);
}
#endif /* !UNIV_HOTBACKUP */
......@@ -1583,20 +1583,20 @@ innobase_query_caching_of_table_permitted(
}
/*********************************************************************
Invalidates the MySQL query cache for the table.
NOTE that the exact prototype of this function has to be in
/innobase/row/row0ins.c! */
Invalidates the MySQL query cache for the table. */
extern "C" UNIV_INTERN
void
innobase_invalidate_query_cache(
/*============================*/
trx_t* trx, /* in: transaction which modifies the table */
char* full_name, /* in: concatenation of database name, null
char '\0', table name, null char'\0';
NOTE that in Windows this is always
in LOWER CASE! */
ulint full_name_len) /* in: full name length where also the null
chars count */
trx_t* trx, /* in: transaction which
modifies the table */
const char* full_name, /* in: concatenation of
database name, null char '\0',
table name, null char '\0';
NOTE that in Windows this is
always in LOWER CASE! */
ulint full_name_len) /* in: full name length where
also the null chars count */
{
/* Note that the sync0sync.h rank of the query cache mutex is just
above the InnoDB kernel mutex. The caller of this function must not
......@@ -1605,7 +1605,7 @@ innobase_invalidate_query_cache(
/* Argument TRUE below means we are using transactions */
#ifdef HAVE_QUERY_CACHE
mysql_query_cache_invalidate4((THD*) trx->mysql_thd,
(const char*) full_name,
full_name,
(uint32) full_name_len,
TRUE);
#endif
......
......@@ -97,7 +97,6 @@ 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
......@@ -129,7 +128,6 @@ 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 */
......
......@@ -87,7 +87,6 @@ void
dict_load_sys_table(
/*================*/
dict_table_t* table); /* in: system table */
#ifndef UNIV_HOTBACKUP
/***************************************************************************
Loads foreign key constraints where the table is either the foreign key
holder or where the table is referenced by a foreign key. Adds these
......@@ -102,7 +101,6 @@ dict_load_foreigns(
const char* table_name, /* in: table name */
ibool check_charsets);/* in: TRUE=check charsets
compatibility */
#endif /* !UNIV_HOTBACKUP */
/************************************************************************
Prints to the standard output information on all tables found in the data
dictionary system table. */
......
......@@ -19,9 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef HA_INNODB_PROTOTYPES_H
#define HA_INNODB_PROTOTYPES_H
#ifndef UNIV_HOTBACKUP
#include "univ.i" /* ulint, uint */
#include "trx0types.h"
#include "m_ctype.h" /* CHARSET_INFO */
/* Prototypes for global functions in ha_innodb.cc that are called by
......@@ -64,6 +62,22 @@ innobase_raw_format(
ulint buf_size); /* in: output buffer size
in bytes */
/*********************************************************************
Invalidates the MySQL query cache for the table. */
UNIV_INTERN
void
innobase_invalidate_query_cache(
/*============================*/
trx_t* trx, /* in: transaction which
modifies the table */
const char* full_name, /* in: concatenation of
database name, null char '\0',
table name, null char '\0';
NOTE that in Windows this is
always in LOWER CASE! */
ulint full_name_len); /* in: full name length where
also the null chars count */
/*********************************************************************
Convert a table or index name to the MySQL system_charset_info (UTF-8)
and quote it if needed. */
......@@ -264,4 +278,3 @@ thd_lock_wait_timeout(
the global innodb_lock_wait_timeout */
#endif
#endif
......@@ -42,13 +42,6 @@ os_fast_mutex_trylock(
EnterCriticalSection(fast_mutex);
return(0);
#else
#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)
/* Since the hot backup version is standalone, MySQL does not redefine
pthread_mutex_trylock for HP-UX-10.20, and consequently we must invert
the return value here */
return((ulint) (1 - pthread_mutex_trylock(fast_mutex)));
#else
/* NOTE that the MySQL my_pthread.h redefines pthread_mutex_trylock
so that it returns 0 on success. In the operating system
......@@ -58,5 +51,4 @@ os_fast_mutex_trylock(
return((ulint) pthread_mutex_trylock(fast_mutex));
#endif
#endif
}
......@@ -141,7 +141,6 @@ cmp_dtuple_is_prefix_of_rec(
const dtuple_t* dtuple, /* in: data tuple */
const rec_t* rec, /* in: physical record */
const ulint* offsets);/* in: array returned by rec_get_offsets() */
#ifndef UNIV_HOTBACKUP
/*****************************************************************
Compare two physical records that contain the same number of columns,
none of which are stored externally. */
......@@ -156,7 +155,6 @@ cmp_rec_rec_simple(
const ulint* offsets1,/* in: rec_get_offsets(rec1, index) */
const ulint* offsets2,/* in: rec_get_offsets(rec2, index) */
const dict_index_t* index); /* in: data dictionary index */
#endif /* !UNIV_HOTBACKUP */
/*****************************************************************
This function is used to compare two physical records. Only the common
first fields are compared, and if an externally stored field is
......
......@@ -351,7 +351,6 @@ void
row_mysql_unfreeze_data_dictionary(
/*===============================*/
trx_t* trx); /* in/out: transaction */
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Creates a table for MySQL. If the name of the table ends in
one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
......@@ -502,7 +501,6 @@ row_check_table_for_mysql(
/* out: DB_ERROR or DB_SUCCESS */
row_prebuilt_t* prebuilt); /* in: prebuilt struct in MySQL
handle */
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Determines if a table is a magic monitor table. */
......
......@@ -40,9 +40,7 @@ Created 9/5/1995 Heikki Tuuri
#include "os0sync.h"
#include "sync0arr.h"
#ifndef UNIV_HOTBACKUP
extern my_bool timed_mutexes;
#endif /* UNIV_HOTBACKUP */
/**********************************************************************
Initializes the synchronization data structures. */
......@@ -515,9 +513,8 @@ struct mutex_struct {
ulint magic_n;
# define MUTEX_MAGIC_N (ulint)979585
#endif /* UNIV_DEBUG */
#ifndef UNIV_HOTBACKUP
ulong count_os_wait; /* count of os_wait */
# ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
ulong count_using; /* count of times mutex used */
ulong count_spin_loop; /* count of spin loops */
ulong count_spin_rounds; /* count of spin rounds */
......@@ -526,8 +523,7 @@ struct mutex_struct {
ulonglong lmax_spent_time; /* mutex os_wait timer msec */
const char* cmutex_name;/* mutex name */
ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */
# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
};
/* The global array of wait cells for implementation of the databases own
......
......@@ -254,9 +254,7 @@ mutex_enter_func(
/* Note that we do not peek at the value of lock_word before trying
the atomic test_and_set; we could peek, and possibly save time. */
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_using++;
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
ut_d(mutex->count_using++);
if (!mutex_test_and_set(mutex)) {
ut_d(mutex->thread_id = os_thread_get_curr_id());
......
......@@ -1438,7 +1438,6 @@ lock_rec_has_expl(
}
#ifdef UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
/*************************************************************************
Checks if some other transaction has a lock request in the queue. */
static
......@@ -1485,7 +1484,6 @@ lock_rec_other_has_expl_req(
return(NULL);
}
# endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
/*************************************************************************
......@@ -4330,8 +4328,6 @@ lock_rec_print(
}
}
#ifndef UNIV_HOTBACKUP
#ifdef UNIV_DEBUG
/* Print the number of lock structs from lock_print_info_summary() only
in non-production builds for performance reasons, see
......@@ -4575,7 +4571,7 @@ loop:
goto loop;
}
# ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
/*************************************************************************
Validates the lock queue on a table. */
static
......@@ -4910,8 +4906,7 @@ lock_validate(void)
return(TRUE);
}
# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/
/*************************************************************************
......
......@@ -161,12 +161,8 @@ os_event_create(
os_fast_mutex_init(&(event->os_mutex));
#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)
ut_a(0 == pthread_cond_init(&(event->cond_var),
pthread_condattr_default));
#else
ut_a(0 == pthread_cond_init(&(event->cond_var), NULL));
#endif
event->is_set = FALSE;
/* We return this value in os_event_reset(), which can then be
......@@ -674,12 +670,8 @@ os_fast_mutex_init(
ut_a(fast_mutex);
InitializeCriticalSection((LPCRITICAL_SECTION) fast_mutex);
#else
#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)
ut_a(0 == pthread_mutex_init(fast_mutex, pthread_mutexattr_default));
#else
ut_a(0 == pthread_mutex_init(fast_mutex, MY_MUTEX_INIT_FAST));
#endif
#endif
if (UNIV_LIKELY(os_sync_mutex_inited)) {
/* When creating os_sync_mutex itself (in Unix) we cannot
......
......@@ -73,7 +73,6 @@ cmp_debug_dtuple_rec_with_match(
returns, contains the value for current
comparison */
#endif /* UNIV_DEBUG */
#ifndef UNIV_HOTBACKUP
/*****************************************************************
This function is used to compare two data fields for which the data type
is such that we must use MySQL code to compare them. The prototype here
......@@ -92,7 +91,6 @@ innobase_mysql_cmp(
const unsigned char* b, /* in: data field */
unsigned int b_length); /* in: data field length,
not UNIV_SQL_NULL */
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Transforms the character code so that it is ordered appropriately for the
language. This is only used for the latin1 char set. MySQL does the
......@@ -161,7 +159,6 @@ cmp_cols_are_equal(
return(col1->mtype != DATA_INT || col1->len == col2->len);
}
#ifndef UNIV_HOTBACKUP
/*****************************************************************
Innobase uses this function to compare two data fields for which the data type
is such that we must compare whole fields or call MySQL to do the comparison */
......@@ -288,7 +285,6 @@ cmp_whole_field(
return(0);
}
#endif /* !UNIV_HOTBACKUP */
/*****************************************************************
This function is used to compare two data fields for which we know the
......@@ -308,7 +304,6 @@ cmp_data_data_slow(
buffer) */
ulint len2) /* in: data field length or UNIV_SQL_NULL */
{
#ifndef UNIV_HOTBACKUP
ulint data1_byte;
ulint data2_byte;
ulint cur_bytes;
......@@ -401,12 +396,6 @@ next_byte:
data1++;
data2++;
}
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* !UNIV_HOTBACKUP */
return(0); /* Not reached */
}
......@@ -442,7 +431,6 @@ cmp_dtuple_rec_with_match(
matched; when function returns, contains the
value for current comparison */
{
#ifndef UNIV_HOTBACKUP
const dfield_t* dtuple_field; /* current field in logical record */
ulint dtuple_f_len; /* the length of the current field
in the logical record */
......@@ -650,13 +638,6 @@ order_resolved:
*matched_bytes = cur_bytes;
return(ret);
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(0);
#endif /* !UNIV_HOTBACKUP */
}
/******************************************************************
......@@ -720,7 +701,6 @@ cmp_dtuple_is_prefix_of_rec(
return(FALSE);
}
#ifndef UNIV_HOTBACKUP
/*****************************************************************
Compare two physical records that contain the same number of columns,
none of which are stored externally. */
......@@ -870,7 +850,6 @@ next_field:
/* If we ran out of fields, rec1 was equal to rec2. */
return(0);
}
#endif /* !UNIV_HOTBACKUP */
/*****************************************************************
This function is used to compare two physical records. Only the common
......@@ -897,7 +876,6 @@ cmp_rec_rec_with_match(
matched; when the function returns, contains
the value for the current comparison */
{
#ifndef UNIV_HOTBACKUP
ulint rec1_n_fields; /* the number of fields in rec */
ulint rec1_f_len; /* length of current field in rec */
const byte* rec1_b_ptr; /* pointer to the current byte
......@@ -1111,13 +1089,6 @@ order_resolved:
*matched_bytes = cur_bytes;
return(ret);
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(0);
#endif /* !UNIV_HOTBACKUP */
}
#ifdef UNIV_DEBUG
......
......@@ -28,6 +28,7 @@ Created 4/20/1996 Heikki Tuuri
#include "row0ins.ic"
#endif
#include "ha_prototypes.h"
#include "dict0dict.h"
#include "dict0boot.h"
#include "trx0undo.h"
......@@ -50,23 +51,6 @@ Created 4/20/1996 Heikki Tuuri
#define ROW_INS_NEXT 2
/*********************************************************************
This prototype is copied from /mysql/sql/ha_innodb.cc.
Invalidates the MySQL query cache for the table.
NOTE that the exact prototype of this function has to be in
/innobase/row/row0ins.c! */
extern
void
innobase_invalidate_query_cache(
/*============================*/
trx_t* trx, /* in: transaction which modifies the table */
char* full_name, /* in: concatenation of database name, null
char '\0', table name, null char'\0';
NOTE that in Windows this is always
in LOWER CASE! */
ulint full_name_len); /* in: full name length where also the null
chars count */
/*************************************************************************
Creates an insert node struct. */
UNIV_INTERN
......@@ -767,10 +751,7 @@ row_ins_invalidate_query_cache(
ut_a(ptr);
*ptr = '\0';
/* We call a function in ha_innodb.cc */
#ifndef UNIV_HOTBACKUP
innobase_invalidate_query_cache(thr_get_trx(thr), buf, len);
#endif
mem_free(buf);
}
......@@ -1172,7 +1153,6 @@ row_ins_set_shared_rec_lock(
return(err);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Sets a exclusive lock on a record. Used in locking possible duplicate key
records */
......@@ -1203,7 +1183,6 @@ row_ins_set_exclusive_rec_lock(
return(err);
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Checks if foreign key constraint fails for an index entry. Sets shared locks
......@@ -1611,7 +1590,6 @@ row_ins_check_foreign_constraints(
return(DB_SUCCESS);
}
#ifndef UNIV_HOTBACKUP
/*******************************************************************
Checks if a unique key violation to rec would occur at the index entry
insert. */
......@@ -1663,7 +1641,6 @@ row_ins_dupl_error_with_rec(
return(!rec_get_deleted_flag(rec, rec_offs_comp(offsets)));
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Scans a unique non-clustered index at a given index entry to determine
......@@ -1679,7 +1656,6 @@ row_ins_scan_sec_index_for_duplicate(
dtuple_t* entry, /* in: index entry */
que_thr_t* thr) /* in: query thread */
{
#ifndef UNIV_HOTBACKUP
ulint n_unique;
ulint i;
int cmp;
......@@ -1789,13 +1765,6 @@ row_ins_scan_sec_index_for_duplicate(
dtuple_set_n_fields_cmp(entry, n_fields_cmp);
return(err);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(DB_FAIL);
#endif /* UNIV_HOTBACKUP */
}
/*******************************************************************
......@@ -1815,7 +1784,6 @@ row_ins_duplicate_error_in_clust(
que_thr_t* thr, /* in: query thread */
mtr_t* mtr) /* in: mtr */
{
#ifndef UNIV_HOTBACKUP
ulint err;
rec_t* rec;
ulint n_unique;
......@@ -1939,13 +1907,6 @@ func_exit:
mem_heap_free(heap);
}
return(err);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(DB_FAIL);
#endif /* UNIV_HOTBACKUP */
}
/*******************************************************************
......
......@@ -78,7 +78,6 @@ the above strings. */
((str1_len) == sizeof(str2_onstack) \
&& memcmp(str1, str2_onstack, sizeof(str2_onstack)) == 0)
#ifndef UNIV_HOTBACKUP
/***********************************************************************
Determine if the given name is a name reserved for MySQL system tables. */
static
......@@ -98,7 +97,6 @@ row_mysql_is_system_table(
|| 0 == strcmp(name + 6, "user")
|| 0 == strcmp(name + 6, "db"));
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
If a table is not yet in the drop list, adds the table to the list of tables
......@@ -489,7 +487,6 @@ row_mysql_handle_errors(
que_thr_t* thr, /* in: query thread */
trx_savept_t* savept) /* in: savepoint or NULL */
{
#ifndef UNIV_HOTBACKUP
ulint err;
handle_new_error:
......@@ -583,13 +580,6 @@ handle_new_error:
trx->error_state = DB_SUCCESS;
return(FALSE);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(FALSE);
#endif /* UNIV_HOTBACKUP */
}
/************************************************************************
......@@ -1743,7 +1733,6 @@ row_mysql_unlock_data_dictionary(
trx->dict_operation_lock_mode = 0;
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Creates a table for MySQL. If the name of the table ends in
one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
......@@ -2110,12 +2099,11 @@ 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 */
......@@ -3375,9 +3363,7 @@ funct_exit:
trx->op_info = "";
#ifndef UNIV_HOTBACKUP
srv_wake_master_thread();
#endif /* !UNIV_HOTBACKUP */
return((int) err);
}
......@@ -4198,7 +4184,6 @@ row_check_table_for_mysql(
return(ret);
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Determines if a table is a magic monitor table. */
......
......@@ -824,8 +824,6 @@ row_search_index_entry(
return(!page_rec_is_infimum(rec) && low_match == n_fields);
}
#ifndef UNIV_HOTBACKUP
#include <my_sys.h>
/***********************************************************************
......@@ -1020,8 +1018,6 @@ row_raw_format(
return(ret);
}
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_COMPILE_TEST_FUNCS
#include "ut0dbg.h"
......
......@@ -356,12 +356,11 @@ UNIV_INTERN ulint srv_n_rows_inserted = 0;
UNIV_INTERN ulint srv_n_rows_updated = 0;
UNIV_INTERN ulint srv_n_rows_deleted = 0;
UNIV_INTERN ulint srv_n_rows_read = 0;
#ifndef UNIV_HOTBACKUP
static ulint srv_n_rows_inserted_old = 0;
static ulint srv_n_rows_updated_old = 0;
static ulint srv_n_rows_deleted_old = 0;
static ulint srv_n_rows_read_old = 0;
#endif /* !UNIV_HOTBACKUP */
UNIV_INTERN ulint srv_n_lock_wait_count = 0;
UNIV_INTERN ulint srv_n_lock_wait_current_count = 0;
......@@ -660,7 +659,6 @@ srv_table_get_nth_slot(
return(srv_sys->threads + index);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Gets the number of threads in the system. */
UNIV_INTERN
......@@ -766,7 +764,6 @@ srv_suspend_thread(void)
return(event);
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Releases threads of the type given from suspension in the thread table.
......@@ -1286,7 +1283,6 @@ srv_boot(void)
return(DB_SUCCESS);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Reserves a slot in the thread table for the current MySQL OS thread.
NOTE! The kernel mutex has to be reserved by the caller! */
......@@ -1351,7 +1347,6 @@ srv_table_reserve_slot_for_mysql(void)
return(slot);
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Puts a MySQL OS thread to wait for a lock to be released. If an error
......@@ -1366,7 +1361,6 @@ srv_suspend_mysql_thread(
que_thr_t* thr) /* in: query thread associated with the MySQL
OS thread */
{
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot;
os_event_t event;
double wait_time;
......@@ -1531,12 +1525,6 @@ srv_suspend_mysql_thread(
trx->error_state = DB_LOCK_WAIT_TIMEOUT;
}
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/************************************************************************
......@@ -1549,7 +1537,6 @@ srv_release_mysql_thread_if_suspended(
que_thr_t* thr) /* in: query thread associated with the
MySQL OS thread */
{
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot;
ulint i;
......@@ -1569,15 +1556,8 @@ srv_release_mysql_thread_if_suspended(
}
/* not found */
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Refreshes the values used to calculate per-second averages. */
static
......@@ -2634,4 +2614,3 @@ suspend_thread:
OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
}
#endif /* !UNIV_HOTBACKUP */
......@@ -238,11 +238,8 @@ rw_lock_create_func(
lock->mutex.cfile_name = cfile_name;
lock->mutex.cline = cline;
# if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
lock->mutex.cmutex_name = cmutex_name;
lock->mutex.mutex_type = 1;
# endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
ut_d(lock->mutex.cmutex_name = cmutex_name);
ut_d(lock->mutex.mutex_type = 1);
#else /* INNODB_RW_LOCKS_USE_ATOMICS */
# ifdef UNIV_DEBUG
UT_NOT_USED(cmutex_name);
......
......@@ -255,9 +255,8 @@ mutex_create_func(
#endif /* UNIV_SYNC_DEBUG */
mutex->cfile_name = cfile_name;
mutex->cline = cline;
#ifndef UNIV_HOTBACKUP
mutex->count_os_wait = 0;
# ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
mutex->cmutex_name= cmutex_name;
mutex->count_using= 0;
mutex->mutex_type= 0;
......@@ -266,8 +265,7 @@ mutex_create_func(
mutex->count_spin_loop= 0;
mutex->count_spin_rounds= 0;
mutex->count_os_yield= 0;
# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
/* Check that lock_word is aligned; this is important on Intel */
ut_ad(((ulint)(&(mutex->lock_word))) % 4 == 0);
......@@ -439,13 +437,13 @@ mutex_spin_wait(
{
ulint index; /* index of the reserved wait cell */
ulint i; /* spin round count */
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
#ifdef UNIV_DEBUG
ib_int64_t lstart_time = 0, lfinish_time; /* for timing os_wait */
ulint ltime_diff;
ulint sec;
ulint ms;
uint timer_started = 0;
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
ut_ad(mutex);
/* This update is not thread safe, but we don't mind if the count
......@@ -465,9 +463,7 @@ mutex_loop:
a memory word. */
spin_loop:
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_spin_loop++;
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
ut_d(mutex->count_spin_loop++);
while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS) {
if (srv_spin_wait_delay) {
......@@ -478,14 +474,14 @@ spin_loop:
}
if (i == SYNC_SPIN_ROUNDS) {
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
#ifdef UNIV_DEBUG
mutex->count_os_yield++;
if (timed_mutexes == 1 && timer_started==0) {
ut_usectime(&sec, &ms);
lstart_time= (ib_int64_t)sec * 1000000 + ms;
timer_started = 1;
}
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
os_thread_yield();
}
......@@ -499,9 +495,7 @@ spin_loop:
mutex_spin_round_count += i;
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_spin_rounds += i;
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
ut_d(mutex->count_spin_rounds += i);
if (mutex_test_and_set(mutex) == 0) {
/* Succeeded! */
......@@ -578,9 +572,8 @@ spin_loop:
mutex_os_wait_count++;
#ifndef UNIV_HOTBACKUP
mutex->count_os_wait++;
# ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
/* !!!!! Sometimes os_wait can be called without os_thread_yield */
if (timed_mutexes == 1 && timer_started==0) {
......@@ -588,14 +581,13 @@ spin_loop:
lstart_time= (ib_int64_t)sec * 1000000 + ms;
timer_started = 1;
}
# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
sync_array_wait_event(sync_primary_wait_array, index);
goto mutex_loop;
finish_timing:
#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
#ifdef UNIV_DEBUG
if (timed_mutexes == 1 && timer_started==1) {
ut_usectime(&sec, &ms);
lfinish_time= (ib_int64_t)sec * 1000000 + ms;
......@@ -607,7 +599,7 @@ finish_timing:
mutex->lmax_spent_time= ltime_diff;
}
}
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
#endif /* UNIV_DEBUG */
return;
}
......
......@@ -68,7 +68,6 @@ trx_general_rollback_for_mysql(
trx_savept_t* savept) /* in: pointer to savepoint undo number, if
partial rollback requested */
{
#ifndef UNIV_HOTBACKUP
mem_heap_t* heap;
que_thr_t* thr;
roll_node_t* roll_node;
......@@ -120,13 +119,6 @@ trx_general_rollback_for_mysql(
srv_active_wake_master_thread();
return((int) trx->error_state);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(DB_FAIL);
#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