summaryrefslogtreecommitdiff
path: root/innobase/sync
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/sync
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/sync')
-rw-r--r--innobase/sync/sync0rw.c2
-rw-r--r--innobase/sync/sync0sync.c19
2 files changed, 16 insertions, 5 deletions
diff --git a/innobase/sync/sync0rw.c b/innobase/sync/sync0rw.c
index 359945594be..973b46fdd50 100644
--- a/innobase/sync/sync0rw.c
+++ b/innobase/sync/sync0rw.c
@@ -102,8 +102,10 @@ rw_lock_create_func(
lock->mutex.cfile_name = cfile_name;
lock->mutex.cline = cline;
+#ifndef UNIV_HOTBACKUP
lock->mutex.cmutex_name = cmutex_name;
lock->mutex.mutex_type = 1;
+#endif /* !UNIV_HOTBACKUP */
rw_lock_set_waiters(lock, 0);
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);
diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c
index 788965f82ef..98b91ed5211 100644
--- a/innobase/sync/sync0sync.c
+++ b/innobase/sync/sync0sync.c
@@ -215,6 +215,7 @@ mutex_create_func(
mutex->level = SYNC_LEVEL_NONE;
mutex->cfile_name = cfile_name;
mutex->cline = cline;
+#ifndef UNIV_HOTBACKUP
mutex->cmutex_name= cmutex_name;
mutex->count_using= 0;
mutex->mutex_type= 0;
@@ -224,7 +225,7 @@ mutex_create_func(
mutex->count_spin_rounds= 0;
mutex->count_os_wait= 0;
mutex->count_os_yield= 0;
-
+#endif /* !UNIV_HOTBACKUP */
/* Check that lock_word is aligned; this is important on Intel */
ut_ad(((ulint)(&(mutex->lock_word))) % 4 == 0);
@@ -372,9 +373,9 @@ mutex_spin_wait(
ulint ltime_diff;
ulint sec;
ulint ms;
-
+#ifndef UNIV_HOTBACKUP
uint timer_started = 0;
-
+#endif /* !UNIV_HOTBACKUP */
ut_ad(mutex);
mutex_loop:
@@ -388,8 +389,10 @@ mutex_loop:
memory word. */
spin_loop:
+#ifndef UNIV_HOTBACKUP
mutex_spin_wait_count++;
mutex->count_spin_loop++;
+#endif /* !UNIV_HOTBACKUP */
while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS)
{
@@ -403,6 +406,7 @@ spin_loop:
if (i == SYNC_SPIN_ROUNDS)
{
+#ifndef UNIV_HOTBACKUP
mutex->count_os_yield++;
if (timed_mutexes == 1 && timer_started==0)
{
@@ -410,6 +414,7 @@ spin_loop:
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
+#endif /* !UNIV_HOTBACKUP */
os_thread_yield();
}
@@ -422,7 +427,9 @@ spin_loop:
mutex_spin_round_count += i;
+#ifndef UNIV_HOTBACKUP
mutex->count_spin_rounds += i;
+#endif /* !UNIV_HOTBACKUP */
if (mutex_test_and_set(mutex) == 0)
{
@@ -504,8 +511,8 @@ Now there is no risk of infinite wait on the event. */
mutex_system_call_count++;
mutex_os_wait_count++;
+#ifndef UNIV_HOTBACKUP
mutex->count_os_wait++;
-
/*
!!!!! Sometimes os_wait can be called without os_thread_yield
*/
@@ -516,12 +523,13 @@ Now there is no risk of infinite wait on the event. */
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
-
+#endif /* !UNIV_HOTBACKUP */
sync_array_wait_event(sync_primary_wait_array, index);
goto mutex_loop;
finish_timing:
+#ifndef UNIV_HOTBACKUP
if (timed_mutexes == 1 && timer_started==1)
{
ut_usectime(&sec, &ms);
@@ -534,6 +542,7 @@ finish_timing:
mutex->lmax_spent_time= ltime_diff;
}
}
+#endif /* !UNIV_HOTBACKUP */
return;
}