MySQL  8.0.19
Source Code Documentation
srv0conc.h File Reference

Go to the source code of this file.

Functions

void srv_conc_enter_innodb (row_prebuilt_t *prebuilt)
 Puts an OS thread to wait if there are too many concurrent threads (>= srv_thread_concurrency) inside InnoDB. More...
 
void srv_conc_force_enter_innodb (trx_t *trx)
 This lets a thread enter InnoDB regardless of the number of threads inside InnoDB. More...
 
void srv_conc_force_exit_innodb (trx_t *trx)
 This must be called when a thread exits InnoDB in a lock wait or at the end of an SQL statement. More...
 
ulint srv_conc_get_waiting_threads (void)
 Get the count of threads waiting inside InnoDB. More...
 
ulint srv_conc_get_active_threads (void)
 Get the count of threads active inside InnoDB. More...
 

Variables

ulint srv_max_n_threads
 We are prepared for a situation that we have this many threads waiting for a semaphore inside InnoDB. More...
 
ulong srv_thread_concurrency
 The following controls how many threads we let inside InnoDB concurrently: threads waiting for locks are not counted into the number because otherwise we could get a deadlock. More...
 

Detailed Description

InnoDB concurrency manager header file

Created 2011/04/18 Sunny Bains

Function Documentation

◆ srv_conc_enter_innodb()

void srv_conc_enter_innodb ( row_prebuilt_t prebuilt)

Puts an OS thread to wait if there are too many concurrent threads (>= srv_thread_concurrency) inside InnoDB.

The threads wait in a FIFO queue.

Parameters
[in,out]prebuiltrow prebuilt handler

◆ srv_conc_force_enter_innodb()

void srv_conc_force_enter_innodb ( trx_t trx)

This lets a thread enter InnoDB regardless of the number of threads inside InnoDB.

This must be called when a thread ends a lock wait. in: transaction object associated with the thread

This must be called when a thread ends a lock wait.

◆ srv_conc_force_exit_innodb()

void srv_conc_force_exit_innodb ( trx_t trx)

This must be called when a thread exits InnoDB in a lock wait or at the end of an SQL statement.

in: transaction object associated with the thread

◆ srv_conc_get_active_threads()

ulint srv_conc_get_active_threads ( void  )

Get the count of threads active inside InnoDB.

◆ srv_conc_get_waiting_threads()

ulint srv_conc_get_waiting_threads ( void  )

Get the count of threads waiting inside InnoDB.

Variable Documentation

◆ srv_max_n_threads

ulint srv_max_n_threads

We are prepared for a situation that we have this many threads waiting for a semaphore inside InnoDB.

innobase_start_or_create_for_mysql() sets the value.

Maximum number of threads inside InnoDB.

innodb_init_params() sets the value.

◆ srv_thread_concurrency

ulong srv_thread_concurrency

The following controls how many threads we let inside InnoDB concurrently: threads waiting for locks are not counted into the number because otherwise we could get a deadlock.

Value of 0 will disable the concurrency check.