summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-02-04 16:25:13 +0200
committerunknown <marko@hundin.mysql.fi>2005-02-04 16:25:13 +0200
commited4dbd12d976800b4bc42aeda4817bd4942c615b (patch)
tree1411d1bdb2fcbc4ab70938c2d2f7bff30bfc96fe /innobase/include
parentaee7a9d7ed21bf3deba6b5f1195b8d06fd917f92 (diff)
downloadmariadb-git-ed4dbd12d976800b4bc42aeda4817bd4942c615b.tar.gz
InnoDB: Exclude code from InnoDB Hot Backup builds
by adding #ifndef UNIV_HOTBACKUP and adjusting some function declarations. innobase/data/data0type.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/dict/dict0dict.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/dict/dict0load.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/include/data0type.ic: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/include/srv0srv.h: Introduce srv_init(), so that it can be called in InnoDB Hot Backup innobase/include/srv0start.h: Introduce srv_add_path_separator_if_needed(), so that it can be invoked in InnoDB Hot Backup innobase/include/sync0sync.h: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/include/sync0sync.ic: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/include/trx0trx.h: trx_recover_for_mysql(): replace uint with ulint, as uint is not declared in InnoDB Hot Backup innobase/lock/lock0lock.c: Replace bool with ibool Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/row/row0ins.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/row/row0mysql.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/srv/srv0srv.c: Make srv_init() global, so that InnoDB Hot Backup can call it. Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/srv/srv0start.c: Make srv_add_path_separator_if_needed() global for InnoDB Hot Backup. Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/sync/sync0rw.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/sync/sync0sync.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/trx/trx0roll.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP innobase/trx/trx0trx.c: Replace uint with ulint, as uint is undeclared in InnoDB Hot Backup innobase/ut/ut0ut.c: Exclude code from InnoDB Hot Backup with #ifndef UNIV_HOTBACKUP
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/data0type.ic7
-rw-r--r--innobase/include/srv0srv.h6
-rw-r--r--innobase/include/srv0start.h10
-rw-r--r--innobase/include/sync0sync.h4
-rw-r--r--innobase/include/sync0sync.ic2
-rw-r--r--innobase/include/trx0trx.h4
6 files changed, 31 insertions, 2 deletions
diff --git a/innobase/include/data0type.ic b/innobase/include/data0type.ic
index 0b92ffbe7f1..15833905761 100644
--- a/innobase/include/data0type.ic
+++ b/innobase/include/data0type.ic
@@ -273,6 +273,7 @@ dtype_get_fixed_size(
/* out: fixed size, or 0 */
dtype_t* type) /* in: type */
{
+#ifndef UNIV_HOTBACKUP
ulint mtype;
mtype = dtype_get_mtype(type);
@@ -321,6 +322,12 @@ dtype_get_fixed_size(
}
return(0);
+#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 */
}
/***************************************************************************
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index c5374fd00fa..27cdaf2e505 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -294,6 +294,12 @@ srv_boot(void);
/*==========*/
/* out: DB_SUCCESS or error code */
/*************************************************************************
+Initializes the server. */
+
+void
+srv_init(void);
+/*==========*/
+/*************************************************************************
Frees the OS fast mutex created in srv_boot(). */
void
diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h
index 8df0f97c4ff..d24f119c0b0 100644
--- a/innobase/include/srv0start.h
+++ b/innobase/include/srv0start.h
@@ -53,6 +53,16 @@ srv_parse_log_group_home_dirs(
error */
char* str, /* in: character string */
char*** log_group_home_dirs); /* out, own: log group home dirs */
+/*************************************************************************
+Adds a slash or a backslash to the end of a string if it is missing
+and the string is not empty. */
+
+char*
+srv_add_path_separator_if_needed(
+/*=============================*/
+ /* out: string which has the separator if the
+ string is not empty */
+ char* str); /* in: null-terminated character string */
/********************************************************************
Starts Innobase and creates a new database if database files
are not found and the user wants. Server parameters are
diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h
index 5046a960bcf..c798c047fa3 100644
--- a/innobase/include/sync0sync.h
+++ b/innobase/include/sync0sync.h
@@ -17,7 +17,9 @@ 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. */
@@ -475,6 +477,7 @@ struct mutex_struct {
const char* cfile_name;/* File name where mutex created */
ulint cline; /* Line where created */
ulint magic_n;
+#ifndef UNIV_HOTBACKUP
ulong count_using; /* count of times mutex used */
ulong count_spin_loop; /* count of spin loops */
ulong count_spin_rounds; /* count of spin rounds */
@@ -484,6 +487,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_HOTBACKUP */
};
#define MUTEX_MAGIC_N (ulint)979585
diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic
index f26f3788dc3..b3fde61db5e 100644
--- a/innobase/include/sync0sync.ic
+++ b/innobase/include/sync0sync.ic
@@ -250,7 +250,9 @@ 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. */
+#ifndef UNIV_HOTBACKUP
mutex->count_using++;
+#endif /* UNIV_HOTBACKUP */
if (!mutex_test_and_set(mutex))
{
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index b63afdd526c..8ac18241e32 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -173,10 +173,10 @@ their transaction objects for a recovery. */
int
trx_recover_for_mysql(
-/*=================*/
+/*==================*/
/* out: number of prepared transactions */
XID* xid_list, /* in/out: prepared transactions */
- uint len); /* in: number of slots in xid_list */
+ ulint len); /* in: number of slots in xid_list */
/***********************************************************************
This function is used to commit one X/Open XA distributed transaction