summaryrefslogtreecommitdiff
path: root/innobase/lock/lock0lock.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-06-16 13:41:14 +0300
committerunknown <marko@hundin.mysql.fi>2004-06-16 13:41:14 +0300
commitd587a36aa131b74d75da6d456ce297f8f8c893e3 (patch)
treedf8a781b0b9fee71976881b14f7cbd640b3068ba /innobase/lock/lock0lock.c
parente4042c25ef4c7162046e953198dfd56bc80db1f8 (diff)
downloadmariadb-git-d587a36aa131b74d75da6d456ce297f8f8c893e3.tar.gz
InnoDB: Revert most of ChangeSet@1.1772, as the debug functions may
be needed when testing production releases innobase/btr/btr0btr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0buf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0flu.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0lru.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0rea.c: Remove #ifdef UNIV_DEBUG around debug code innobase/data/data0type.c: Remove #ifdef UNIV_DEBUG around debug code innobase/dict/dict0dict.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fsp/fsp0fsp.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fut/fut0lst.c: Remove #ifdef UNIV_DEBUG around debug code innobase/ibuf/ibuf0ibuf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/include/btr0btr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0flu.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0lru.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/data0type.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/dict0dict.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fsp0fsp.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fut0lst.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/lock0lock.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0pool.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mtr0mtr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/pars0opt.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0rw.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0sync.h: Remove #ifdef UNIV_DEBUG around debug code innobase/lock/lock0lock.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0dbg.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0pool.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mtr/mtr0mtr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/pars/pars0opt.c: Remove #ifdef UNIV_DEBUG around debug code innobase/srv/srv0start.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0rw.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0sync.c: Remove #ifdef UNIV_DEBUG around debug code innobase/trx/trx0roll.c: Remove #ifdef UNIV_DEBUG around debug code
Diffstat (limited to 'innobase/lock/lock0lock.c')
-rw-r--r--innobase/lock/lock0lock.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index d9848577728..11bd1f93808 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -292,9 +292,7 @@ waiting, in its lock queue. Solution: We can copy the locks as gap type
locks, so that also the waiting locks are transformed to granted gap type
locks on the inserted record. */
-#ifdef UNIV_DEBUG
ibool lock_print_waits = FALSE;
-#endif /* UNIV_DEBUG */
/* The lock system */
lock_sys_t* lock_sys = NULL;
@@ -1354,8 +1352,7 @@ lock_rec_has_expl(
return(NULL);
}
-
-#ifdef UNIV_DEBUG
+
/*************************************************************************
Checks if some other transaction has a lock request in the queue. */
static
@@ -1398,7 +1395,6 @@ lock_rec_other_has_expl_req(
return(NULL);
}
-#endif /* UNIV_DEBUG */
/*************************************************************************
Checks if some other transaction has a conflicting explicit lock request
@@ -1688,13 +1684,11 @@ lock_rec_enqueue_waiting(
ut_a(que_thr_stop(thr));
-#ifdef UNIV_DEBUG
if (lock_print_waits) {
fprintf(stderr, "Lock wait for trx %lu in index ",
ut_dulint_get_low(trx->id));
ut_print_name(stderr, index->name);
}
-#endif /* UNIV_DEBUG */
return(DB_LOCK_WAIT);
}
@@ -2034,12 +2028,10 @@ lock_grant(
lock->trx->n_tables_locked++;
}
-#ifdef UNIV_DEBUG
if (lock_print_waits) {
fprintf(stderr, "Lock wait for trx %lu ends\n",
ut_dulint_get_low(lock->trx->id));
}
-#endif /* UNIV_DEBUG */
/* If we are resolving a deadlock by choosing another transaction
as a victim, then our original transaction may not be in the
@@ -3110,11 +3102,9 @@ lock_deadlock_recursive(
lock_table_print(ef, start->wait_lock);
}
-#ifdef UNIV_DEBUG
if (lock_print_waits) {
fputs("Deadlock detected\n", stderr);
}
-#endif /* UNIV_DEBUG */
if (ut_dulint_cmp(wait_lock->trx->undo_no,
start->undo_no) >= 0) {
@@ -4174,7 +4164,6 @@ loop:
goto loop;
}
-#ifdef UNIV_DEBUG
/*************************************************************************
Validates the lock queue on a table. */
@@ -4485,7 +4474,6 @@ lock_validate(void)
return(TRUE);
}
-#endif /* UNIV_DEBUG */
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/