MySQL 8.0.39
Source Code Documentation
que0que.ic File Reference

Query graph. More...

#include "usr0sess.h"

Functions

static trx_tthr_get_trx (que_thr_t *thr)
 Gets the trx of a query thread. More...
 
static bool thr_is_recv (const que_thr_t *thr)
 Determines if this thread is rolling back an incomplete transaction in crash recovery. More...
 
static que_thr_tque_fork_get_first_thr (que_fork_t *fork)
 Gets the first thr in a fork. More...
 
static que_node_tque_fork_get_child (que_fork_t *fork)
 Gets the child node of the first thr in a fork. More...
 
static ulint que_node_get_type (const que_node_t *node)
 Gets the type of a graph node. More...
 
static dfield_tque_node_get_val (que_node_t *node)
 Gets pointer to the value dfield of a graph node. More...
 
static ulint que_node_get_val_buf_size (que_node_t *node)
 Gets the value buffer size of a graph node. More...
 
static void que_node_set_val_buf_size (que_node_t *node, ulint size)
 Sets the value buffer size of a graph node. More...
 
static void que_node_set_parent (que_node_t *node, que_node_t *parent)
 Sets the parent of a graph node. More...
 
static dtype_tque_node_get_data_type (que_node_t *node)
 Gets pointer to the value data type field of a graph node. More...
 
static que_node_tque_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. More...
 
static que_node_tque_node_list_get_last (que_node_t *node_list)
 
static que_node_tque_node_get_next (que_node_t *node)
 Gets the next list node in a list of query graph nodes. More...
 
static ulint que_node_list_get_len (que_node_t *node_list)
 Gets a query graph node list length. More...
 
static que_node_tque_node_get_parent (que_node_t *node)
 Gets the parent node of a query graph node. More...
 
static bool 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. More...
 
static bool que_graph_is_select (que_t *graph)
 Returns true if the query graph is for a SELECT statement. More...
 

Detailed Description

Query graph.

Created 5/27/1996 Heikki Tuuri

Function Documentation

◆ que_fork_get_child()

static que_node_t * que_fork_get_child ( que_fork_t fork)
inlinestatic

Gets the child node of the first thr in a fork.

Parameters
forkin: query fork

◆ que_fork_get_first_thr()

static que_thr_t * que_fork_get_first_thr ( que_fork_t fork)
inlinestatic

Gets the first thr in a fork.

Parameters
forkin: query fork

◆ que_graph_is_select()

static bool que_graph_is_select ( que_t graph)
inlinestatic

Returns true if the query graph is for a SELECT statement.

Returns
true if a select
Parameters
graphin: graph

◆ que_node_get_data_type()

static dtype_t * que_node_get_data_type ( que_node_t node)
inlinestatic

Gets pointer to the value data type field of a graph node.

Parameters
nodein: graph node

◆ que_node_get_next()

static que_node_t * que_node_get_next ( que_node_t node)
inlinestatic

Gets the next list node in a list of query graph nodes.

Returns
next node in a list of nodes
Parameters
nodein: node in a list

◆ que_node_get_parent()

static que_node_t * que_node_get_parent ( que_node_t node)
inlinestatic

Gets the parent node of a query graph node.

Returns
parent node or NULL
Parameters
nodein: node

◆ que_node_get_type()

static ulint que_node_get_type ( const que_node_t node)
inlinestatic

Gets the type of a graph node.

Parameters
nodein: graph node

◆ que_node_get_val()

static dfield_t * que_node_get_val ( que_node_t node)
inlinestatic

Gets pointer to the value dfield of a graph node.

Parameters
nodein: graph node

◆ que_node_get_val_buf_size()

static ulint que_node_get_val_buf_size ( que_node_t node)
inlinestatic

Gets the value buffer size of a graph node.

Returns
val buffer size, not defined if val.data == NULL in node
Parameters
nodein: graph node

◆ que_node_list_add_last()

static que_node_t * que_node_list_add_last ( que_node_t node_list,
que_node_t node 
)
inlinestatic

Catenates a query graph node to a list of them, possible empty list.

Returns
one-way list of nodes
Parameters
node_listin: node list, or NULL
nodein: node

◆ que_node_list_get_last()

static que_node_t * que_node_list_get_last ( que_node_t node_list)
inlinestatic

◆ que_node_list_get_len()

static ulint que_node_list_get_len ( que_node_t node_list)
inlinestatic

Gets a query graph node list length.

Returns
length, for NULL list 0
Parameters
node_listin: node list, or NULL

◆ que_node_set_parent()

static void que_node_set_parent ( que_node_t node,
que_node_t parent 
)
inlinestatic

Sets the parent of a graph node.

Parameters
nodein: graph node
parentin: parent

◆ que_node_set_val_buf_size()

static void que_node_set_val_buf_size ( que_node_t node,
ulint  size 
)
inlinestatic

Sets the value buffer size of a graph node.

Parameters
nodein: graph node
sizein: size

◆ que_thr_peek_stop()

static bool que_thr_peek_stop ( que_thr_t thr)
inlinestatic

Checks if graph, trx, or session is in a state where the query thread should be stopped.

Returns
true if should be stopped; NOTE that if the peek is made without reserving the trx mutex, then another peek with the mutex reserved is necessary before deciding the actual stopping
Parameters
thrin: query thread

◆ thr_get_trx()

static trx_t * thr_get_trx ( que_thr_t thr)
inlinestatic

Gets the trx of a query thread.

Parameters
thrin: query thread

◆ thr_is_recv()

static bool thr_is_recv ( const que_thr_t thr)
inlinestatic

Determines if this thread is rolling back an incomplete transaction in crash recovery.

Returns
true if thr is rolling back an incomplete transaction in crash recovery
Parameters
thrin: query thread