#include "univ.i"
#include "data0data.h"
#include "dict0types.h"
#include "trx0trx.h"
#include "trx0roll.h"
#include "srv0srv.h"
#include "usr0types.h"
#include "que0types.h"
#include "row0types.h"
#include "pars0types.h"
#include "que0que.ic"
Go to the source code of this file.
Classes | |
struct | que_thr_struct |
struct | que_fork_struct |
Defines | |
#define | QUE_THR_MAGIC_N 8476583 |
#define | QUE_THR_MAGIC_FREED 123461526 |
#define | QUE_FORK_SELECT_NON_SCROLL 1 |
#define | QUE_FORK_SELECT_SCROLL 2 |
#define | QUE_FORK_INSERT 3 |
#define | QUE_FORK_UPDATE 4 |
#define | QUE_FORK_ROLLBACK 5 |
#define | QUE_FORK_PURGE 6 |
#define | QUE_FORK_EXECUTE 7 |
#define | QUE_FORK_PROCEDURE 8 |
#define | QUE_FORK_PROCEDURE_CALL 9 |
#define | QUE_FORK_MYSQL_INTERFACE 10 |
#define | QUE_FORK_RECOVERY 11 |
#define | QUE_FORK_ACTIVE 1 |
#define | QUE_FORK_COMMAND_WAIT 2 |
#define | QUE_FORK_INVALID 3 |
#define | QUE_FORK_BEING_FREED 4 |
#define | QUE_NODE_CONTROL_STAT 1024 |
#define | QUE_NODE_LOCK 1 |
#define | QUE_NODE_INSERT 2 |
#define | QUE_NODE_UPDATE 4 |
#define | QUE_NODE_CURSOR 5 |
#define | QUE_NODE_SELECT 6 |
#define | QUE_NODE_AGGREGATE 7 |
#define | QUE_NODE_FORK 8 |
#define | QUE_NODE_THR 9 |
#define | QUE_NODE_UNDO 10 |
#define | QUE_NODE_COMMIT 11 |
#define | QUE_NODE_ROLLBACK 12 |
#define | QUE_NODE_PURGE 13 |
#define | QUE_NODE_CREATE_TABLE 14 |
#define | QUE_NODE_CREATE_INDEX 15 |
#define | QUE_NODE_SYMBOL 16 |
#define | QUE_NODE_RES_WORD 17 |
#define | QUE_NODE_FUNC 18 |
#define | QUE_NODE_ORDER 19 |
#define | QUE_NODE_PROC (20 + QUE_NODE_CONTROL_STAT) |
#define | QUE_NODE_IF (21 + QUE_NODE_CONTROL_STAT) |
#define | QUE_NODE_WHILE (22 + QUE_NODE_CONTROL_STAT) |
#define | QUE_NODE_ASSIGNMENT 23 |
#define | QUE_NODE_FETCH 24 |
#define | QUE_NODE_OPEN 25 |
#define | QUE_NODE_COL_ASSIGNMENT 26 |
#define | QUE_NODE_FOR (27 + QUE_NODE_CONTROL_STAT) |
#define | QUE_NODE_RETURN 28 |
#define | QUE_NODE_ROW_PRINTF 29 |
#define | QUE_NODE_ELSIF 30 |
#define | QUE_NODE_CALL 31 |
#define | QUE_NODE_EXIT 32 |
#define | QUE_THR_RUNNING 1 |
#define | QUE_THR_PROCEDURE_WAIT 2 |
#define | QUE_THR_COMPLETED 3 |
#define | QUE_THR_COMMAND_WAIT 4 |
#define | QUE_THR_LOCK_WAIT 5 |
#define | QUE_THR_SIG_REPLY_WAIT 6 |
#define | QUE_THR_SUSPENDED 7 |
#define | QUE_THR_ERROR 8 |
#define | QUE_THR_LOCK_NOLOCK 0 |
#define | QUE_THR_LOCK_ROW 1 |
#define | QUE_THR_LOCK_TABLE 2 |
#define | QUE_CUR_NOT_DEFINED 1 |
#define | QUE_CUR_START 2 |
#define | QUE_CUR_END 3 |
Functions | |
UNIV_INTERN void | que_graph_publish (que_t *graph, sess_t *sess) |
UNIV_INTERN que_fork_t * | que_fork_create (que_t *graph, que_node_t *parent, ulint fork_type, mem_heap_t *heap) |
UNIV_INLINE que_thr_t * | que_fork_get_first_thr (que_fork_t *fork) |
UNIV_INLINE que_node_t * | que_fork_get_child (que_fork_t *fork) |
UNIV_INLINE void | que_node_set_parent (que_node_t *node, que_node_t *parent) |
UNIV_INTERN que_thr_t * | que_thr_create (que_fork_t *parent, mem_heap_t *heap) |
UNIV_INTERN void | que_graph_free_recursive (que_node_t *node) |
UNIV_INTERN void | que_graph_free (que_t *graph) |
UNIV_INTERN ibool | que_thr_stop (que_thr_t *thr) |
UNIV_INTERN void | que_thr_move_to_run_state_for_mysql (que_thr_t *thr, trx_t *trx) |
UNIV_INTERN void | que_thr_stop_for_mysql_no_error (que_thr_t *thr, trx_t *trx) |
UNIV_INTERN void | que_thr_stop_for_mysql (que_thr_t *thr) |
UNIV_INTERN void | que_run_threads (que_thr_t *thr) |
UNIV_INTERN void | que_fork_error_handle (trx_t *trx, que_t *fork) |
UNIV_INTERN void | que_thr_end_wait (que_thr_t *thr, que_thr_t **next_thr) |
UNIV_INTERN void | que_thr_end_wait_no_next_thr (que_thr_t *thr) |
UNIV_INTERN que_thr_t * | que_fork_start_command (que_fork_t *fork) |
UNIV_INLINE trx_t * | thr_get_trx (que_thr_t *thr) |
UNIV_INLINE ibool | thr_is_recv (const que_thr_t *thr) |
UNIV_INLINE ulint | que_node_get_type (que_node_t *node) |
UNIV_INLINE dtype_t * | que_node_get_data_type (que_node_t *node) |
UNIV_INLINE dfield_t * | que_node_get_val (que_node_t *node) |
UNIV_INLINE ulint | que_node_get_val_buf_size (que_node_t *node) |
UNIV_INLINE void | que_node_set_val_buf_size (que_node_t *node, ulint size) |
UNIV_INLINE que_node_t * | que_node_get_next (que_node_t *node) |
UNIV_INLINE que_node_t * | que_node_get_parent (que_node_t *node) |
UNIV_INTERN que_node_t * | que_node_get_containing_loop_node (que_node_t *node) |
UNIV_INLINE que_node_t * | que_node_list_add_last (que_node_t *node_list, que_node_t *node) |
UNIV_INLINE ulint | que_node_list_get_len (que_node_t *node_list) |
UNIV_INLINE ibool | que_thr_peek_stop (que_thr_t *thr) |
UNIV_INLINE ibool | que_graph_is_select (que_t *graph) |
UNIV_INTERN void | que_node_print_info (que_node_t *node) |
UNIV_INTERN ulint | que_eval_sql (pars_info_t *info, const char *sql, ibool reserve_dict_mutex, trx_t *trx) |
Variables | |
ibool | que_trace_on |
UNIV_INTERN ulint que_eval_sql | ( | pars_info_t * | info, |
const char * | sql, | ||
ibool | reserve_dict_mutex, | ||
trx_t * | trx | ||
) |
Evaluate the given SQL
Evaluate the given SQL.
info | in: info struct, or NULL |
sql | in: SQL string |
reserve_dict_mutex | in: if TRUE, acquire/release dict_sys->mutex around call to pars_sql. |
trx | in: trx |
Definition at line 1392 of file que0que.cc.
References trx_struct::error_state, que_fork_struct::fork_type, trx_struct::graph, dict_sys_struct::mutex, pars_sql(), que_eval_sql(), que_fork_start_command(), que_graph_free(), que_run_threads(), que_fork_struct::trx, and ut_a.
Referenced by dict_create_or_check_foreign_constraint_tables(), que_eval_sql(), row_discard_tablespace_for_mysql(), row_drop_table_for_mysql(), row_rename_table_for_mysql(), and row_truncate_table_for_mysql().
UNIV_INTERN que_fork_t* que_fork_create | ( | que_t * | graph, |
que_node_t * | parent, | ||
ulint | fork_type, | ||
mem_heap_t * | heap | ||
) |
Creates a query graph fork node.
Creates a query graph fork node.
graph | in: graph, if NULL then this fork node is assumed to be the graph root |
parent | in: parent node |
fork_type | in: fork type |
heap | in: memory heap where created |
Definition at line 156 of file que0que.cc.
References que_fork_struct::caller, que_fork_struct::common, que_fork_struct::fork_type, que_fork_struct::graph, que_fork_struct::heap, que_fork_struct::info, mem_heap_alloc(), que_fork_struct::n_active_thrs, que_common_struct::parent, que_fork_create(), que_fork_struct::state, que_fork_struct::sym_tab, que_fork_struct::thrs, que_common_struct::type, ut_ad, and UT_LIST_INIT.
Referenced by pars_complete_graph_for_exec(), pars_procedure_definition(), que_fork_create(), and trx_roll_graph_build().
After signal handling is finished, returns control to a query graph error handling routine. (Currently, just returns the control to the root of the graph so that the graph can communicate an error message to the client.) in: query graph which was run before signal handling started, NULL not allowed
After signal handling is finished, returns control to a query graph error handling routine. (Currently, just returns the control to the root of the graph so that the graph can communicate an error message to the client.)
fork | in: query graph which was run before signal handling started, NULL not allowed |
Definition at line 426 of file que0que.cc.
References que_thr_struct::child, que_thr_struct::is_active, que_thr_struct::prev_node, que_fork_error_handle(), que_thr_struct::run_node, srv_que_task_enqueue_low(), que_thr_struct::state, que_fork_struct::thrs, ut_a, ut_ad, UT_LIST_GET_FIRST, UT_LIST_GET_LEN, and UT_LIST_GET_NEXT.
Referenced by que_fork_error_handle(), and trx_end_signal_handling().
UNIV_INLINE que_node_t* que_fork_get_child | ( | que_fork_t * | fork | ) |
Gets the child node of the first thr in a fork. in: query fork
UNIV_INLINE que_thr_t* que_fork_get_first_thr | ( | que_fork_t * | fork | ) |
Gets the first thr in a fork. in: query fork
Referenced by row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_search_for_mysql(), and row_update_for_mysql().
UNIV_INTERN que_thr_t* que_fork_start_command | ( | que_fork_t * | fork | ) |
Starts execution of a command in a query fork. Picks a query thread which is not in the QUE_THR_RUNNING state and moves it to that state. If none can be chosen, a situation which may arise in parallelized fetches, NULL is returned.
Starts execution of a command in a query fork. Picks a query thread which is not in the QUE_THR_RUNNING state and moves it to that state. If none can be chosen, a situation which may arise in parallelized fetches, NULL is returned.
fork | in: a query fork |
Definition at line 342 of file que0que.cc.
References que_fork_struct::last_sel_node, que_fork_start_command(), que_thr_struct::state, que_fork_struct::state, que_fork_struct::thrs, ut_error, UT_LIST_GET_FIRST, and UT_LIST_GET_NEXT.
Referenced by que_eval_sql(), que_fork_start_command(), row_create_index_for_mysql(), row_create_table_for_mysql(), trx_general_rollback_for_mysql(), trx_purge(), and trx_rollback().
UNIV_INTERN void que_graph_free | ( | que_t * | graph | ) |
Frees a query graph. in: query graph; we assume that the memory heap where this graph was created is private to this graph: if not, then use que_graph_free_recursive and free the heap afterwards!
Frees a query graph.
graph | in: query graph; we assume that the memory heap where this graph was created is private to this graph: if not, then use que_graph_free_recursive and free the heap afterwards! |
Definition at line 679 of file que0que.cc.
References pars_info_struct::graph_owns_us, que_fork_struct::heap, que_fork_struct::info, mem_heap_free, pars_info_free(), que_graph_free(), que_graph_free_recursive(), que_fork_struct::sym_tab, sym_tab_free_private(), and ut_ad.
Referenced by que_eval_sql(), que_graph_free(), row_create_index_for_mysql(), row_create_table_for_mysql(), trx_finish_rollback_off_kernel(), and trx_purge_sys_close().
UNIV_INTERN void que_graph_free_recursive | ( | que_node_t * | node | ) |
Frees a query graph, but not the heap where it was created. Does not free explicit cursor declarations, they are freed in que_graph_free. in: query graph node
Frees a query graph, but not the heap where it was created. Does not free explicit cursor declarations, they are freed in que_graph_free.
node | in: query graph node |
Definition at line 508 of file que0que.cc.
References que_thr_struct::child, ind_node_struct::heap, tab_node_struct::heap, upd_node_struct::heap, purge_node_struct::heap, undo_node_struct::heap, que_thr_struct::magic_n, mem_analyze_corruption(), mem_heap_free, upd_node_struct::pcur, que_graph_free_recursive(), que_node_get_type(), sel_node_free_private(), upd_node_struct::select, ins_node_struct::select, que_fork_struct::thrs, ut_error, UT_LIST_GET_FIRST, and UT_LIST_GET_NEXT.
Referenced by que_graph_free(), que_graph_free_recursive(), row_prebuilt_free(), and sym_tab_free_private().
UNIV_INLINE ibool que_graph_is_select | ( | que_t * | graph | ) |
Returns TRUE if the query graph is for a SELECT statement.
Adds a query graph to the session's list of graphs. in: session
Adds a query graph to the session's list of graphs.
graph | in: graph |
sess | in: session |
Definition at line 141 of file que0que.cc.
References sess_struct::graphs, que_graph_publish(), ut_ad, and UT_LIST_ADD_LAST.
Referenced by que_graph_publish().
UNIV_INTERN que_node_t* que_node_get_containing_loop_node | ( | que_node_t * | node | ) |
Get the first containing loop node (e.g. while_node_t or for_node_t) for the given node, or NULL if the node is not within a loop.
Get the first containing loop node (e.g. while_node_t or for_node_t) for the given node, or NULL if the node is not within a loop.
node | in: node |
Definition at line 1067 of file que0que.cc.
References que_node_get_containing_loop_node(), que_node_get_parent(), que_node_get_type(), and ut_ad.
Referenced by exit_step(), and que_node_get_containing_loop_node().
UNIV_INLINE dtype_t* que_node_get_data_type | ( | que_node_t * | node | ) |
Gets pointer to the value data type field of a graph node. in: graph node
UNIV_INLINE que_node_t* que_node_get_next | ( | que_node_t * | node | ) |
Gets the next list node in a list of query graph nodes. in: node in a list
Referenced by eval_cmp(), for_step(), if_step(), opt_find_all_cols(), opt_search_plan(), pars_create_index(), pars_create_table(), pars_if_statement(), row_fetch_print(), row_printf_step(), row_sel_step(), and while_step().
UNIV_INLINE que_node_t* que_node_get_parent | ( | que_node_t * | node | ) |
Gets the parent node of a query graph node.
Referenced by assign_step(), dict_create_index_step(), dict_create_table_step(), exit_step(), fetch_step(), for_step(), if_step(), que_node_get_containing_loop_node(), return_step(), row_create_index_for_mysql(), row_create_table_for_mysql(), row_get_prebuilt_update_vector(), row_ins_step(), row_prebuild_sel_graph(), row_printf_step(), row_sel_step(), row_upd_step(), trx_commit_step(), trx_general_rollback_for_mysql(), trx_rollback_step(), and while_step().
UNIV_INLINE ulint que_node_get_type | ( | que_node_t * | node | ) |
Gets the type of a graph node. in: graph node
Referenced by assign_step(), dict_create_index_step(), dict_create_table_step(), eval_cmp(), eval_node_free_val_buf(), exit_step(), fetch_step(), for_step(), if_step(), opt_find_all_cols(), pars_if_statement(), que_graph_free_recursive(), que_node_get_containing_loop_node(), que_node_print_info(), return_step(), row_ins_check_foreign_constraint(), row_ins_step(), row_printf_step(), row_purge_step(), row_sel_step(), row_undo_step(), row_upd_step(), trx_commit_step(), trx_rollback_step(), and while_step().
UNIV_INLINE dfield_t* que_node_get_val | ( | que_node_t * | node | ) |
Gets pointer to the value dfield of a graph node. in: graph node
Referenced by eval_cmp(), eval_node_free_val_buf(), pars_assignment_statement(), pars_column_def(), pars_create_table(), pars_variable_declaration(), row_fetch_print(), and row_printf_step().
UNIV_INLINE ulint que_node_get_val_buf_size | ( | que_node_t * | node | ) |
Gets the value buffer size of a graph node.
Referenced by eval_node_free_val_buf().
UNIV_INLINE que_node_t* que_node_list_add_last | ( | que_node_t * | node_list, |
que_node_t * | node | ||
) |
Catenates a query graph node to a list of them, possible empty list.
node_list | in: node list, or NULL |
Referenced by pars_op(), and pars_update_statement().
UNIV_INLINE ulint que_node_list_get_len | ( | que_node_t * | node_list | ) |
Gets a query graph node list length.
Referenced by pars_create_index(), pars_create_table(), pars_fetch_statement(), pars_insert_statement(), and pars_select_statement().
UNIV_INTERN void que_node_print_info | ( | que_node_t * | node | ) |
Prints info of an SQL query graph node. in: query graph node
Prints info of an SQL query graph node.
node | in: query graph node |
Definition at line 1096 of file que0que.cc.
References que_node_get_type(), and que_node_print_info().
Referenced by que_node_print_info().
UNIV_INLINE void que_node_set_parent | ( | que_node_t * | node, |
que_node_t * | parent | ||
) |
Sets the parent of a graph node. in: parent
node | in: graph node |
Referenced by pars_complete_graph_for_exec().
UNIV_INLINE void que_node_set_val_buf_size | ( | que_node_t * | node, |
ulint | size | ||
) |
Sets the value buffer size of a graph node. in: size
node | in: graph node |
UNIV_INTERN void que_run_threads | ( | que_thr_t * | thr | ) |
Run a query thread. Handles lock waits. in: query thread
Run a query thread. Handles lock waits.
thr | in: query thread |
Definition at line 1336 of file que0que.cc.
References que_run_threads(), srv_suspend_mysql_thread(), que_thr_struct::state, thr_get_trx(), ut_a, and ut_error.
Referenced by que_eval_sql(), que_run_threads(), row_create_index_for_mysql(), row_create_table_for_mysql(), trx_general_rollback_for_mysql(), and trx_purge().
UNIV_INTERN que_thr_t* que_thr_create | ( | que_fork_t * | parent, |
mem_heap_t * | heap | ||
) |
Creates a query graph thread node.
Creates a query graph thread node.
parent | in: parent node, i.e., a fork node |
heap | in: memory heap where created |
Definition at line 202 of file que0que.cc.
References que_thr_struct::common, que_fork_struct::graph, que_thr_struct::graph, que_thr_struct::is_active, que_thr_struct::lock_state, que_thr_struct::magic_n, mem_heap_alloc(), que_common_struct::parent, que_thr_create(), que_thr_struct::resource, que_thr_struct::run_node, que_thr_struct::state, que_fork_struct::thrs, que_common_struct::type, ut_ad, and UT_LIST_ADD_LAST.
Referenced by pars_complete_graph_for_exec(), pars_procedure_definition(), que_thr_create(), and trx_roll_graph_build().
Moves a suspended query thread to the QUE_THR_RUNNING state and releases a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure completion. in/out: next query thread to run; if the value which is passed in is a pointer to a NULL pointer, then the calling function can start running a new query thread
Moves a suspended query thread to the QUE_THR_RUNNING state and may release a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure completion.
thr | in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state |
next_thr | in/out: next query thread to run; if the value which is passed in is a pointer to a NULL pointer, then the calling function can start running a new query thread; if NULL is passed as the parameter, it is ignored |
Definition at line 240 of file que0que.cc.
References que_thr_struct::is_active, que_thr_struct::prev_node, que_thr_end_wait(), que_thr_struct::run_node, srv_que_task_enqueue_low(), que_thr_struct::state, ut_a, and ut_ad.
Referenced by que_thr_end_wait(), and trx_sig_reply().
UNIV_INTERN void que_thr_end_wait_no_next_thr | ( | que_thr_t * | thr | ) |
Same as que_thr_end_wait, but no parameter next_thr available. in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state
Same as que_thr_end_wait, but no parameter next_thr available.
thr | in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state |
Definition at line 285 of file que0que.cc.
References que_thr_struct::is_active, que_thr_end_wait_no_next_thr(), srv_release_mysql_thread_if_suspended(), que_thr_struct::state, ut_a, and ut_ad.
Referenced by que_thr_end_wait_no_next_thr(), and trx_end_lock_wait().
Moves a thread from another state to the QUE_THR_RUNNING state. Increments the n_active_thrs counters of the query graph and transaction. in: transaction
Moves a thread from another state to the QUE_THR_RUNNING state. Increments the n_active_thrs counters of the query graph and transaction if thr was not active.
thr | in: an query thread |
trx | in: transaction |
Definition at line 1001 of file que0que.cc.
References que_thr_struct::graph, que_thr_struct::is_active, que_thr_struct::magic_n, mem_analyze_corruption(), trx_struct::n_active_thrs, que_fork_struct::n_active_thrs, que_thr_move_to_run_state_for_mysql(), que_thr_struct::state, and ut_error.
Referenced by que_thr_move_to_run_state_for_mysql(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_search_for_mysql(), and row_update_for_mysql().
UNIV_INLINE ibool que_thr_peek_stop | ( | que_thr_t * | thr | ) |
Checks if graph, trx, or session is in a state where the query thread should be stopped.
UNIV_INTERN ibool que_thr_stop | ( | que_thr_t * | thr | ) |
Stops a query thread if graph or trx is in a state requiring it. The conditions are tested in the order (1) graph, (2) trx. The kernel mutex has to be reserved.
Stops a query thread if graph or trx is in a state requiring it. The conditions are tested in the order (1) graph, (2) trx. The kernel mutex has to be reserved.
thr | in: query thread |
Definition at line 908 of file que0que.cc.
References trx_struct::error_state, que_fork_struct::fork_type, que_thr_struct::graph, trx_struct::que_state, que_thr_stop(), trx_struct::signals, que_thr_struct::state, que_fork_struct::state, que_fork_struct::trx, ut_ad, UT_LIST_ADD_FIRST, UT_LIST_GET_LEN, and trx_struct::wait_thrs.
Referenced by que_thr_stop().
UNIV_INTERN void que_thr_stop_for_mysql | ( | que_thr_t * | thr | ) |
A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The query thread is stopped and made inactive, except in the case where it was put to the lock wait state in lock0lock.c, but the lock has already been granted or the transaction chosen as a victim in deadlock resolution. in: query thread
A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The query thread is stopped and made inactive, except in the case where it was put to the lock wait state in lock0lock.c, but the lock has already been granted or the transaction chosen as a victim in deadlock resolution.
thr | in: query thread |
Definition at line 955 of file que0que.cc.
References trx_struct::error_state, que_thr_struct::graph, que_thr_struct::is_active, que_fork_struct::n_active_thrs, trx_struct::n_active_thrs, que_thr_stop_for_mysql(), que_thr_struct::state, thr_get_trx(), and ut_ad.
Referenced by que_thr_stop_for_mysql(), row_ins_check_foreign_constraint(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_mysql_handle_errors(), row_search_for_mysql(), row_update_cascade_for_mysql(), and row_update_for_mysql().
A patch for MySQL used to 'stop' a dummy query thread used in MySQL select, when there is no error or lock wait. in: transaction
A patch for MySQL used to 'stop' a dummy query thread used in MySQL select, when there is no error or lock wait.
thr | in: query thread |
trx | in: transaction |
Definition at line 1033 of file que0que.cc.
References que_thr_struct::graph, que_thr_struct::is_active, que_thr_struct::magic_n, mem_analyze_corruption(), que_fork_struct::n_active_thrs, trx_struct::n_active_thrs, que_thr_stop_for_mysql_no_error(), que_thr_struct::state, ut_ad, and ut_error.
Referenced by que_thr_stop_for_mysql_no_error(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_search_for_mysql(), and row_update_for_mysql().
Gets the trx of a query thread. in: query thread
Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_del_mark_set_sec_rec(), btr_cur_optimistic_insert(), btr_cur_optimistic_update(), btr_cur_pessimistic_update(), btr_cur_update_in_place(), dict_create_index_step(), dict_create_table_step(), fetch_step(), lock_clust_rec_modify_check_and_lock(), lock_clust_rec_read_check_and_lock(), lock_rec_insert_check_and_lock(), lock_sec_rec_modify_check_and_lock(), lock_sec_rec_read_check_and_lock(), lock_table(), que_run_threads(), que_thr_stop_for_mysql(), row_ins_check_foreign_constraint(), row_ins_step(), row_sel_step(), row_undo_step(), row_upd_step(), row_update_cascade_for_mysql(), srv_lock_timeout_thread(), srv_suspend_mysql_thread(), trx_commit_step(), trx_rollback_step(), trx_sig_reply(), trx_sig_send(), and trx_undo_report_row_operation().
UNIV_INLINE ibool thr_is_recv | ( | const que_thr_t * | thr | ) |
Determines if this thread is rolling back an incomplete transaction in crash recovery.