mariadb/storage/innobase/trx
Marko Mäkelä e71e613353 MDEV-24671: Replace lock_wait_timeout_task with mysql_cond_timedwait()
lock_wait(): Replaces lock_wait_suspend_thread(). Wait for the lock to
be granted or the transaction to be killed using mysql_cond_timedwait()
or mysql_cond_wait().

lock_wait_end(): Replaces que_thr_end_lock_wait() and
lock_wait_release_thread_if_suspended().

lock_wait_timeout_task: Remove. The operating system kernel will
resume the mysql_cond_timedwait() in lock_wait(). An added benefit
is that innodb_lock_wait_timeout no longer has a 'jitter' of 1 second,
which was caused by this wake-up task waking up only once per second,
and then waking up any threads for which the timeout (which was only
measured in seconds) was exceeded.

innobase_kill_query(): Set trx->error_state=DB_INTERRUPTED,
so that a call trx_is_interrupted(trx) in lock_wait() can be avoided.

We will protect things more consistently with lock_sys.wait_mutex,
which will be moved below lock_sys.mutex in the latching order.

trx_lock_t::cond: Condition variable for !wait_lock, used with
lock_sys.wait_mutex.

srv_slot_t: Remove. Replaced by trx_lock_t::cond,

lock_grant_after_reset(): Merged to to lock_grant().

lock_rec_get_index_name(): Remove.

lock_sys_t: Introduce wait_pending, wait_count, wait_time, wait_time_max
that are protected by wait_mutex.

trx_lock_t::que_state: Remove.

que_thr_state_t: Remove QUE_THR_COMMAND_WAIT, QUE_THR_LOCK_WAIT.

que_thr_t: Remove is_active, start_running(), stop_no_error().

que_fork_t::n_active_thrs, trx_lock_t::n_active_thrs: Remove.
2021-01-27 15:45:39 +02:00
..
trx0i_s.cc MDEV-24671: Replace lock_wait_timeout_task with mysql_cond_timedwait() 2021-01-27 15:45:39 +02:00
trx0purge.cc MDEV-24671: Replace lock_wait_timeout_task with mysql_cond_timedwait() 2021-01-27 15:45:39 +02:00
trx0rec.cc MDEV-515 Reduce InnoDB undo logging for insert into empty table 2021-01-25 18:41:27 +02:00
trx0roll.cc MDEV-24671: Replace lock_wait_timeout_task with mysql_cond_timedwait() 2021-01-27 15:45:39 +02:00
trx0rseg.cc Merge 10.5 into 10.6 2021-01-25 12:56:30 +02:00
trx0sys.cc MDEV-24142: Remove the LatchDebug interface to rw-locks 2020-12-03 15:27:50 +02:00
trx0trx.cc MDEV-24671: Replace lock_wait_timeout_task with mysql_cond_timedwait() 2021-01-27 15:45:39 +02:00
trx0undo.cc Merge 10.5 into 10.6 2021-01-25 12:56:30 +02:00