summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-07-01 15:31:28 -0700
committerunknown <igor@rurik.mysql.com>2006-07-01 15:31:28 -0700
commit912e54d7b8452d74a459907a5023f2b7c6ab025c (patch)
tree75f44943450160b535b36e44ec1ced13b9a08364 /mysys/thr_lock.c
parent1b66efe9d625df7d4d88dbacb8b97a9976bcf449 (diff)
parent3cf92fb7d67b22f33f4846ecf68c3f56c301cc20 (diff)
downloadmariadb-git-912e54d7b8452d74a459907a5023f2b7c6ab025c.tar.gz
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into rurik.mysql.com:/home/igor/mysql-5.0-opt
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index f5a8b618949..51df50a4926 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -204,6 +204,8 @@ static void check_locks(THR_LOCK *lock, const char *where,
{
if ((int) data->type == (int) TL_READ_NO_INSERT)
count++;
+ /* Protect against infinite loop. */
+ DBUG_ASSERT(count <= lock->read_no_write_count);
}
if (count != lock->read_no_write_count)
{