diff options
author | unknown <serg@janus.mylan> | 2006-11-12 14:44:12 +0100 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2006-11-12 14:44:12 +0100 |
commit | 41f890bc98fe26128ab18737e4acc846db09b74f (patch) | |
tree | 731695a7797c63fd3df21a9def828ec030b61543 /storage/maria/lockman.c | |
parent | 4510971399eccc0d8c5bae6fba91869c87c34d73 (diff) | |
download | mariadb-git-41f890bc98fe26128ab18737e4acc846db09b74f.tar.gz |
minor unittest fixes
storage/maria/lockman.c:
restore removed lines
storage/maria/unittest/lockman2-t.c:
fix the plan
Diffstat (limited to 'storage/maria/lockman.c')
-rw-r--r-- | storage/maria/lockman.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c index 31867d3903d..7a6b97b3d51 100644 --- a/storage/maria/lockman.c +++ b/storage/maria/lockman.c @@ -103,10 +103,6 @@ whether it's possible to lock the row, but no need to lock it - perhaps the thread has a loose lock on this table). This is defined by getlock_result[] table. - - TODO optimization: table locks - they have completely - different characteristics. long lists, few distinct resources - - slow to scan, [possibly] high retry rate */ #include <my_global.h> @@ -487,6 +483,9 @@ static int lockdelete(LOCK * volatile *head, LOCK *node, LF_PINS *pins) res= lockfind(head, node, &cursor, pins); DBUG_ASSERT(res & ALREADY_HAVE); + if (cursor.upgrade_from) + cursor.upgrade_from->flags&= ~IGNORE_ME; + /* XXX this does not work with savepoints, as old lock is left ignored. It cannot be unignored, as would basically mean moving the lock back @@ -506,7 +505,11 @@ static int lockdelete(LOCK * volatile *head, LOCK *node, LF_PINS *pins) lockfind(head, node, &cursor, pins); } else + { res= REPEAT_ONCE_MORE; + if (cursor.upgrade_from) + cursor.upgrade_from->flags|= IGNORE_ME; + } } while (res == REPEAT_ONCE_MORE); _lf_unpin(pins, 0); _lf_unpin(pins, 1); |