• unknown's avatar
    A fix and a test case for Bug#10760 and complementary cleanups. · 5f07c9d2
    unknown authored
    The idea of the patch
    is that every cursor gets its own lock id for table level locking.
    Thus cursors are protected from updates performed within the same 
    connection. Additionally a list of transient (must be closed at
    commit) cursors is maintained and all transient cursors are closed
    when necessary. Lastly, this patch adds support for deadlock
    timeouts to TLL locking when using cursors.
    + post-review fixes.
    
    
    include/thr_lock.h:
      - add a notion of lock owner to table level locking. When using
        cursors, lock owner can not be identified by a thread id any more, 
        as we must protect cursors from updates issued within the same 
        connection (thread). So, each cursor has its own lock identifier to 
        use with table level locking.
      - extend return values of thr_lock and thr_multi_lock with
        THR_LOCK_TIMEOUT and THR_LOCK_DEADLOCK, since these conditions
        are now possible (see comments to thr_lock.c)
    mysys/thr_lock.c:
      Better sup...
    5f07c9d2
ha_myisam.h 4.87 KB