From ec8779e95a46b3dfff492196ad004cb2716df3c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Oct 2004 16:04:28 +0300 Subject: Fix test case for innodb-lock mysql-test/r/innodb-lock.result: Fix test case (old one didn't test things correctly) mysql-test/t/innodb-lock.test: Fix test case (old one didn't test things correctly) mysys/thr_lock.c: More debugging information sql/mysqld.cc: Enable innodb_table_locks as default, as otherwise there is a possibility for deadlocks sql/sql_base.cc: More debug information --- mysys/thr_lock.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mysys/thr_lock.c') diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index d5236cb1ef9..935ed4ea282 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -552,8 +552,14 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) !lock->write_wait.data && lock->write.data->type == TL_WRITE_ALLOW_WRITE)) { - /* We have already got a write lock or all locks are - TL_WRITE_ALLOW_WRITE */ + /* + We have already got a write lock or all locks are + TL_WRITE_ALLOW_WRITE + */ + DBUG_PRINT("info", ("write_wait.data: 0x%lx old_type: %d", + (ulong) lock->write_wait.data, + lock->write.data->type)); + (*lock->write.last)=data; /* Add to running fifo */ data->prev=lock->write.last; lock->write.last= &data->next; @@ -568,6 +574,8 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) } else { + DBUG_PRINT("info", ("write_wait.data: 0x%lx", + (ulong) lock->write_wait.data)); if (!lock->write_wait.data) { /* no scheduled write locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && -- cgit v1.2.1