Commit 966e4b44 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-maria

into  janus.mylan:/usr/home/serg/Abk/mysql-maria

parents f6edbbc8 41f890bc
...@@ -103,10 +103,6 @@ ...@@ -103,10 +103,6 @@
whether it's possible to lock the row, but no need to lock it - perhaps 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 the thread has a loose lock on this table). This is defined by
getlock_result[] table. 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> #include <my_global.h>
...@@ -487,6 +483,9 @@ static int lockdelete(LOCK * volatile *head, LOCK *node, LF_PINS *pins) ...@@ -487,6 +483,9 @@ static int lockdelete(LOCK * volatile *head, LOCK *node, LF_PINS *pins)
res= lockfind(head, node, &cursor, pins); res= lockfind(head, node, &cursor, pins);
DBUG_ASSERT(res & ALREADY_HAVE); 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. 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 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) ...@@ -506,7 +505,11 @@ static int lockdelete(LOCK * volatile *head, LOCK *node, LF_PINS *pins)
lockfind(head, node, &cursor, pins); lockfind(head, node, &cursor, pins);
} }
else else
{
res= REPEAT_ONCE_MORE; res= REPEAT_ONCE_MORE;
if (cursor.upgrade_from)
cursor.upgrade_from->flags|= IGNORE_ME;
}
} while (res == REPEAT_ONCE_MORE); } while (res == REPEAT_ONCE_MORE);
_lf_unpin(pins, 0); _lf_unpin(pins, 0);
_lf_unpin(pins, 1); _lf_unpin(pins, 1);
......
...@@ -264,7 +264,7 @@ int main() ...@@ -264,7 +264,7 @@ int main()
my_init(); my_init();
pthread_mutex_init(&rt_mutex, 0); pthread_mutex_init(&rt_mutex, 0);
plan(35); plan(39);
if (my_atomic_initialize()) if (my_atomic_initialize())
return exit_status(); return exit_status();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment