MySQL  8.0.22
Source Code Documentation
que0que.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1996, 2020, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License, version 2.0, as published by the
7 Free Software Foundation.
8 
9 This program is also distributed with certain software (including but not
10 limited to OpenSSL) that is licensed under separate terms, as designated in a
11 particular file or component or in included license documentation. The authors
12 of MySQL hereby grant you an additional permission to link the program and
13 your derivative works with the separately licensed software that they have
14 included with MySQL.
15 
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
19 for more details.
20 
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 
25 *****************************************************************************/
26 
27 /** @file include/que0que.h
28  Query graph
29 
30  Created 5/27/1996 Heikki Tuuri
31  *******************************************************/
32 
33 #ifndef que0que_h
34 #define que0que_h
35 
36 #include "data0data.h"
37 #include "dict0types.h"
38 #include "pars0types.h"
39 #include "que0types.h"
40 #include "row0types.h"
41 #include "srv0srv.h"
42 #include "trx0roll.h"
43 #include "trx0trx.h"
44 #include "univ.i"
45 #include "usr0types.h"
46 
47 /** Mutex protecting the query threads. */
48 extern ib_mutex_t que_thr_mutex;
49 
50 /** Creates a query graph fork node.
51  @return own: fork node */
53  que_t *graph, /*!< in: graph, if NULL then this
54  fork node is assumed to be the
55  graph root */
56  que_node_t *parent, /*!< in: parent node */
57  ulint fork_type, /*!< in: fork type */
58  mem_heap_t *heap); /*!< in: memory heap where created */
59 /** Gets the first thr in a fork. */
60 UNIV_INLINE
61 que_thr_t *que_fork_get_first_thr(que_fork_t *fork); /*!< in: query fork */
62 /** Gets the child node of the first thr in a fork. */
63 UNIV_INLINE
64 que_node_t *que_fork_get_child(que_fork_t *fork); /*!< in: query fork */
65 
66 /** Sets the parent of a graph node.
67 @param[in] node graph node
68 @param[in] parent parent */
69 UNIV_INLINE
70 void que_node_set_parent(que_node_t *node, que_node_t *parent);
71 
72 /** Creates a query graph thread node.
73 @param[in] parent parent node, i.e., a fork node
74 @param[in] heap memory heap where created
75 @param[in] prebuilt row prebuilt structure
76 @return own: query thread node */
78  row_prebuilt_t *prebuilt);
79 /** Frees a query graph, but not the heap where it was created. Does not free
80  explicit cursor declarations, they are freed in que_graph_free. */
81 void que_graph_free_recursive(que_node_t *node); /*!< in: query graph node */
82 /** Frees a query graph. */
83 void que_graph_free(que_t *graph); /*!< in: query graph; we assume that the
84  memory heap where this graph was created is
85  private to this graph: if not, then use
86  que_graph_free_recursive and free the heap
87  afterwards! */
88 /** Stops a query thread if graph or trx is in a state requiring it. The
89  conditions are tested in the order (1) graph, (2) trx.
90  Caller must hold the trx mutex.
91  @param[in,out] thr query thread
92  @return true if stopped */
93 bool que_thr_stop(que_thr_t *thr);
94 
95 /** Moves a thread from another state to the QUE_THR_RUNNING state. Increments
96  the n_active_thrs counters of the query graph and transaction. */
98  que_thr_t *thr, /*!< in: an query thread */
99  trx_t *trx); /*!< in: transaction */
100 
101 /** A patch for MySQL used to 'stop' a dummy query thread used in MySQL
102  select, when there is no error or lock wait.
103 @param[in] thr Query thread
104 @param[in] trx Transaction */
106 
107 /** A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The
108  query thread is stopped and made inactive, except in the case where
109  it was put to the lock wait state in lock0lock.cc, but the lock has already
110  been granted or the transaction chosen as a victim in deadlock resolution. */
111 void que_thr_stop_for_mysql(que_thr_t *thr); /*!< in: query thread */
112 /** Run a query thread. Handles lock waits. */
113 void que_run_threads(que_thr_t *thr); /*!< in: query thread */
114 /** Moves a suspended query thread to the QUE_THR_RUNNING state and release
115  a worker thread to execute it. This function should be used to end
116  the wait state of a query thread waiting for a lock or a stored procedure
117  completion.
118  @return query thread instance of thread to wakeup or NULL */
119 que_thr_t *que_thr_end_lock_wait(trx_t *trx); /*!< in: transaction in the
120  QUE_THR_LOCK_WAIT state */
121 /** Starts execution of a command in a query fork. Picks a query thread which
122  is not in the QUE_THR_RUNNING state and moves it to that state. If none
123  can be chosen, a situation which may arise in parallelized fetches, NULL
124  is returned.
125  @return a query thread of the graph moved to QUE_THR_RUNNING state, or
126  NULL; the query thread should be executed by que_run_threads by the
127  caller */
128 que_thr_t *que_fork_start_command(que_fork_t *fork); /*!< in: a query fork */
129 /** Gets the trx of a query thread. */
130 UNIV_INLINE
131 trx_t *thr_get_trx(que_thr_t *thr); /*!< in: query thread */
132 /** Determines if this thread is rolling back an incomplete transaction
133  in crash recovery.
134  @return true if thr is rolling back an incomplete transaction in crash
135  recovery */
136 UNIV_INLINE
137 ibool thr_is_recv(const que_thr_t *thr); /*!< in: query thread */
138 /** Gets the type of a graph node. */
139 UNIV_INLINE
140 ulint que_node_get_type(const que_node_t *node); /*!< in: graph node */
141 /** Gets pointer to the value data type field of a graph node. */
142 UNIV_INLINE
143 dtype_t *que_node_get_data_type(que_node_t *node); /*!< in: graph node */
144 /** Gets pointer to the value dfield of a graph node. */
145 UNIV_INLINE
146 dfield_t *que_node_get_val(que_node_t *node); /*!< in: graph node */
147 /** Gets the value buffer size of a graph node.
148  @return val buffer size, not defined if val.data == NULL in node */
149 UNIV_INLINE
150 ulint que_node_get_val_buf_size(que_node_t *node); /*!< in: graph node */
151 
152 /** Sets the value buffer size of a graph node.
153 @param[in] node graph node
154 @param[in] size size */
155 UNIV_INLINE
156 void que_node_set_val_buf_size(que_node_t *node, ulint size);
157 
158 /** Gets the next list node in a list of query graph nodes. */
159 UNIV_INLINE
160 que_node_t *que_node_get_next(que_node_t *node); /*!< in: node in a list */
161 /** Gets the parent node of a query graph node.
162  @return parent node or NULL */
163 UNIV_INLINE
164 que_node_t *que_node_get_parent(que_node_t *node); /*!< in: node */
165 /** Get the first containing loop node (e.g. while_node_t or for_node_t) for the
166  given node, or NULL if the node is not within a loop.
167  @return containing loop node, or NULL. */
169  que_node_t *node); /*!< in: node */
170 
171 /** Catenates a query graph node to a list of them, possible empty list.
172 @param[in] node_list node list, or NULL
173 @param[in] node node
174 @return one-way list of nodes */
175 UNIV_INLINE
177 
178 /*************************************************************************
179 Get the last node from the list.*/
180 UNIV_INLINE
182  /* out: node last node from list.*/
183  que_node_t *node_list); /* in: node list, or NULL */
184 /** Gets a query graph node list length.
185  @return length, for NULL list 0 */
186 UNIV_INLINE
188  que_node_t *node_list); /*!< in: node list, or NULL */
189 /** Checks if graph, trx, or session is in a state where the query thread should
190  be stopped.
191  @return true if should be stopped; NOTE that if the peek is made
192  without reserving the trx_t::mutex, then another peek with the mutex
193  reserved is necessary before deciding the actual stopping */
194 UNIV_INLINE
195 ibool que_thr_peek_stop(que_thr_t *thr); /*!< in: query thread */
196 /** Returns TRUE if the query graph is for a SELECT statement.
197  @return true if a select */
198 UNIV_INLINE
199 ibool que_graph_is_select(que_t *graph); /*!< in: graph */
200 /** Prints info of an SQL query graph node. */
201 void que_node_print_info(que_node_t *node); /*!< in: query graph node */
202 /** Evaluate the given SQL
203  @return error code or DB_SUCCESS */
204 dberr_t que_eval_sql(pars_info_t *info, /*!< in: info struct, or NULL */
205  const char *sql, /*!< in: SQL string */
206  ibool reserve_dict_mutex,
207  /*!< in: if TRUE, acquire/release
208  dict_sys->mutex around call to pars_sql. */
209  trx_t *trx); /*!< in: trx */
210 
211 /** Round robin scheduler.
212  @return a query thread of the graph moved to QUE_THR_RUNNING state, or
213  NULL; the query thread should be executed by que_run_threads by the
214  caller */
216  que_fork_t *fork, /*!< in: a query fork */
217  que_thr_t *thr); /*!< in: current pos */
218 
219 /** Initialise the query sub-system. */
220 void que_init(void);
221 
222 /** Close the query sub-system. */
223 void que_close(void);
224 
225 /** Query thread states */
229  /** in selects this means that the thread is at the end of its
230  result set (or start, in case of a scroll cursor); in other
231  statements, this means the thread has done its task */
236 };
237 
238 /** Query thread lock states */
243 };
244 
245 /** From where the cursor position is counted */
247 
248 /* Query graph query thread node: the fields are protected by the
249 trx_t::mutex with the exceptions named below */
250 
251 struct que_thr_t {
252  que_common_t common; /*!< type: QUE_NODE_THR */
253  ulint magic_n; /*!< magic number to catch memory
254  corruption */
255  que_node_t *child; /*!< graph child node */
256  que_t *graph; /*!< graph where this node belongs */
257  que_thr_state_t state; /*!< state of the query thread */
258  ibool is_active; /*!< TRUE if the thread has been set
259  to the run state in
260  que_thr_move_to_run_state, but not
261  deactivated in
262  que_thr_dec_reference_count */
263  /*------------------------------*/
264  /* The following fields are private to the OS thread executing the
265  query thread, and are not protected by any mutex: */
266 
267  que_node_t *run_node; /*!< pointer to the node where the
268  subgraph down from this node is
269  currently executed */
270  que_node_t *prev_node; /*!< pointer to the node from which
271  the control came */
272  ulint resource; /*!< resource usage of the query thread
273  thus far */
274  ulint lock_state; /*!< lock state of thread (table or
275  row) */
276 
277  /** The thread slot in the lock_sys->waiting_threads array protected by
278  lock_sys->wait_mutex when writing to it, and also by trx->mutex when changing
279  from null to non-null.
280  While reading, one can either hold the lock_sys->wait_mutex, or hold the
281  trx->mutex and a proof that no one has woken the trx yet,
282  so the slot is either still null (if trx hadn't yet started the sleep), or
283  already non-null (if it already started sleep), but definitely not
284  changing from null to non-null (as it requires trx->mutex) nor
285  changing from non-null to null (as it happens after wake up). */
286  struct srv_slot_t *slot;
287  /*------------------------------*/
288  /* The following fields are links for the various lists that
289  this type can be on. */
291  thrs; /*!< list of thread nodes of the fork
292  node */
294  trx_thrs; /*!< lists of threads in wait list of
295  the trx */
297  queue; /*!< list of runnable thread nodes in
298  the server task queue */
299  ulint fk_cascade_depth; /*!< maximum cascading call depth
300  supported for foreign key constraint
301  related delete/updates */
302  row_prebuilt_t *prebuilt; /*!< prebuilt structure processed by
303  the query thread */
304 };
305 
306 #define QUE_THR_MAGIC_N 8476583
307 #define QUE_THR_MAGIC_FREED 123461526
308 
309 /* Query graph fork node: its fields are protected by the query thread mutex */
310 struct que_fork_t {
311  que_common_t common; /*!< type: QUE_NODE_FORK */
312  que_t *graph; /*!< query graph of this node */
313  ulint fork_type; /*!< fork type */
314  ulint n_active_thrs; /*!< if this is the root of a graph, the
315  number query threads that have been
316  started in que_thr_move_to_run_state
317  but for which que_thr_dec_refer_count
318  has not yet been called */
319  trx_t *trx; /*!< transaction: this is set only in
320  the root node */
321  ulint state; /*!< state of the fork node */
322  que_thr_t *caller; /*!< pointer to a possible calling query
323  thread */
325  thrs; /*!< list of query threads */
326  /*------------------------------*/
327  /* The fields in this section are defined only in the root node */
328  sym_tab_t *sym_tab; /*!< symbol table of the query,
329  generated by the parser, or NULL
330  if the graph was created 'by hand' */
331  pars_info_t *info; /*!< info struct, or NULL */
332  /* The following cur_... fields are relevant only in a select graph */
333 
334  ulint cur_end; /*!< QUE_CUR_NOT_DEFINED, QUE_CUR_START,
335  QUE_CUR_END */
336  ulint cur_pos; /*!< if there are n rows in the result
337  set, values 0 and n + 1 mean before
338  first row, or after last row, depending
339  on cur_end; values 1...n mean a row
340  index */
341  ibool cur_on_row; /*!< TRUE if cursor is on a row, i.e.,
342  it is not before the first row or
343  after the last row */
344  sel_node_t *last_sel_node; /*!< last executed select node, or NULL
345  if none */
347  graphs; /*!< list of query graphs of a session
348  or a stored procedure */
349  /*------------------------------*/
350  mem_heap_t *heap; /*!< memory heap where the fork was
351  created */
352 };
353 
354 /* Query fork (or graph) types */
355 #define QUE_FORK_SELECT_NON_SCROLL 1 /* forward-only cursor */
356 #define QUE_FORK_SELECT_SCROLL 2 /* scrollable cursor */
357 #define QUE_FORK_INSERT 3
358 #define QUE_FORK_UPDATE 4
359 #define QUE_FORK_ROLLBACK 5
360 /* This is really the undo graph used in rollback,
361 no signal-sending roll_node in this graph */
362 #define QUE_FORK_PURGE 6
363 #define QUE_FORK_EXECUTE 7
364 #define QUE_FORK_PROCEDURE 8
365 #define QUE_FORK_PROCEDURE_CALL 9
366 #define QUE_FORK_MYSQL_INTERFACE 10
367 #define QUE_FORK_RECOVERY 11
368 
369 /* Query fork (or graph) states */
370 #define QUE_FORK_ACTIVE 1
371 #define QUE_FORK_COMMAND_WAIT 2
372 #define QUE_FORK_INVALID 3
373 #define QUE_FORK_BEING_FREED 4
374 
375 /* Flag which is ORed to control structure statement node types */
376 #define QUE_NODE_CONTROL_STAT 1024
377 
378 /* Query graph node types */
379 #define QUE_NODE_LOCK 1
380 #define QUE_NODE_INSERT 2
381 #define QUE_NODE_UPDATE 4
382 #define QUE_NODE_CURSOR 5
383 #define QUE_NODE_SELECT 6
384 #define QUE_NODE_AGGREGATE 7
385 #define QUE_NODE_FORK 8
386 #define QUE_NODE_THR 9
387 #define QUE_NODE_UNDO 10
388 #define QUE_NODE_COMMIT 11
389 #define QUE_NODE_ROLLBACK 12
390 #define QUE_NODE_PURGE 13
391 #define QUE_NODE_SYMBOL 14
392 #define QUE_NODE_RES_WORD 15
393 #define QUE_NODE_FUNC 16
394 #define QUE_NODE_ORDER 17
395 #define QUE_NODE_PROC (18 + QUE_NODE_CONTROL_STAT)
396 #define QUE_NODE_IF (19 + QUE_NODE_CONTROL_STAT)
397 #define QUE_NODE_WHILE (20 + QUE_NODE_CONTROL_STAT)
398 #define QUE_NODE_ASSIGNMENT 21
399 #define QUE_NODE_FETCH 22
400 #define QUE_NODE_OPEN 23
401 #define QUE_NODE_COL_ASSIGNMENT 24
402 #define QUE_NODE_FOR (25 + QUE_NODE_CONTROL_STAT)
403 #define QUE_NODE_RETURN 26
404 #define QUE_NODE_ELSIF 27
405 #define QUE_NODE_CALL 28
406 #define QUE_NODE_EXIT 29
407 
408 #include "que0que.ic"
409 
410 #endif
void que_node_print_info(que_node_t *node)
Prints info of an SQL query graph node.
Definition: que0que.h:246
void que_close(void)
Close the query sub-system.
Definition: que0que.cc:1083
void que_thr_move_to_run_state_for_mysql(que_thr_t *thr, trx_t *trx)
Moves a thread from another state to the QUE_THR_RUNNING state.
Definition: que0que.cc:723
ulint fork_type
fork type
Definition: que0que.h:313
ulint n_active_thrs
if this is the root of a graph, the number query threads that have been started in que_thr_move_to_ru...
Definition: que0que.h:314
in selects this means that the thread is at the end of its result set (or start, in case of a scroll ...
Definition: que0que.h:232
UNIV_INLINE ulint que_node_get_val_buf_size(que_node_t *node)
Gets the value buffer size of a graph node.
void que_thr_stop_for_mysql(que_thr_t *thr)
A patch for MySQL used to &#39;stop&#39; a dummy query thread used in MySQL.
Definition: que0que.cc:685
UNIV_INLINE que_node_t * que_fork_get_child(que_fork_t *fork)
Gets the child node of the first thr in a fork.
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.
que_thr_t * que_fork_start_command(que_fork_t *fork)
Starts execution of a command in a query fork.
Definition: que0que.cc:277
Definition: trx0trx.h:833
ib_mutex_t que_thr_mutex
Mutex protecting the query threads.
UNIV_INLINE void que_node_set_val_buf_size(que_node_t *node, ulint size)
Sets the value buffer size of a graph node.
ibool is_active
TRUE if the thread has been set to the run state in que_thr_move_to_run_state, but not deactivated in...
Definition: que0que.h:258
Symbol table.
Definition: pars0sym.h:200
trx_thrs
lists of threads in wait list of the trx
Definition: que0que.h:294
queue
list of runnable thread nodes in the server task queue
Definition: que0que.h:297
ulint state
state of the fork node
Definition: que0que.h:321
row_prebuilt_t * prebuilt
prebuilt structure processed by the query thread
Definition: que0que.h:302
void que_thr_stop_for_mysql_no_error(que_thr_t *thr, trx_t *trx)
A patch for MySQL used to &#39;stop&#39; a dummy query thread used in MySQL select, when there is no error or...
Definition: que0que.cc:744
que_node_t * que_node_get_containing_loop_node(que_node_t *node)
Get the first containing loop node (e.g.
Definition: que0que.cc:762
Definition: que0que.h:240
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:349
Transaction rollback.
que_thr_t * que_thr_end_lock_wait(trx_t *trx)
Moves a suspended query thread to the QUE_THR_RUNNING state and release a worker thread to execute it...
Definition: que0que.cc:190
SQL data field and tuple.
Definition: que0que.h:310
que_thr_state_t
Query thread states.
Definition: que0que.h:226
UNIV_INLINE ibool que_graph_is_select(que_t *graph)
Returns TRUE if the query graph is for a SELECT statement.
void que_graph_free(que_t *graph)
Frees a query graph.
Definition: que0que.cc:507
The server main program.
SQL parser global types.
Query graph global types.
Definition: que0que.h:234
que_thr_t * caller
pointer to a possible calling query thread
Definition: que0que.h:322
que_node_t * run_node
pointer to the node where the subgraph down from this node is currently executed
Definition: que0que.h:267
UNIV_INLINE ulint que_node_list_get_len(que_node_t *node_list)
Gets a query graph node list length.
ulint fk_cascade_depth
maximum cascading call depth supported for foreign key constraint related delete/updates ...
Definition: que0que.h:299
que_thr_lock_t
Query thread lock states.
Definition: que0que.h:239
Definition: que0que.h:235
Definition: que0que.h:246
A struct for (sometimes lazily) prebuilt structures in an Innobase table handle used within MySQL; th...
Definition: row0mysql.h:550
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.
Data dictionary global types.
Definition: que0que.h:227
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.
Extra information supplied for pars_sql().
Definition: pars0pars.h:450
trx_t * trx
transaction: this is set only in the root node
Definition: que0que.h:319
ulint lock_state
lock state of thread (table or row)
Definition: que0que.h:274
Definition: que0que.h:241
UNIV_INLINE void que_node_set_parent(que_node_t *node, que_node_t *parent)
Sets the parent of a graph node.
dberr_t
Definition: db0err.h:38
Row operation global types.
que_cur_t
From where the cursor position is counted.
Definition: que0que.h:246
Definition: que0que.h:251
Definition: que0que.h:246
que_common_t common
type: QUE_NODE_THR
Definition: que0que.h:252
Structure for an SQL data field.
Definition: data0data.h:639
void que_run_threads(que_thr_t *thr)
Run a query thread.
Definition: que0que.cc:994
Definition: que0que.h:228
void que_init(void)
Initialise the query sub-system.
Definition: que0que.cc:1079
UNIV_INLINE que_thr_t * que_fork_get_first_thr(que_fork_t *fork)
Gets the first thr in a fork.
Definition: data0type.h:497
void que_node_t
Definition: que0types.h:40
UNIV_INLINE que_node_t * que_node_list_get_last(que_node_t *node_list)
Definition: que0types.h:50
Select statement node.
Definition: row0sel.h:341
UNIV_INLINE ulint que_node_get_type(const que_node_t *node)
Gets the type of a graph node.
que_thr_t * que_thr_create(que_fork_t *parent, mem_heap_t *heap, row_prebuilt_t *prebuilt)
Creates a query graph thread node.
Definition: que0que.cc:157
#define UT_LIST_BASE_NODE_T(TYPE)
Definition: innodb_utility.h:47
UNIV_INLINE que_node_t * que_node_get_parent(que_node_t *node)
Gets the parent node of a query graph node.
dberr_t que_eval_sql(pars_info_t *info, const char *sql, ibool reserve_dict_mutex, trx_t *trx)
Evaluate the given SQL.
Definition: que0que.cc:1041
que_thr_t * que_fork_scheduler_round_robin(que_fork_t *fork, que_thr_t *thr)
Round robin scheduler.
Definition: que0que.cc:233
que_node_t * child
graph child node
Definition: que0que.h:255
void que_graph_free_recursive(que_node_t *node)
Frees a query graph, but not the heap where it was created.
Definition: que0que.cc:364
Users and sessions global types.
UNIV_INLINE ibool thr_is_recv(const que_thr_t *thr)
Determines if this thread is rolling back an incomplete transaction in crash recovery.
que_node_t * prev_node
pointer to the node from which the control came
Definition: que0que.h:270
UNIV_INLINE trx_t * thr_get_trx(que_thr_t *thr)
Gets the trx of a query thread.
Definition: que0que.h:233
The transaction.
que_t * graph
graph where this node belongs
Definition: que0que.h:256
Log info(cout, "NOTE")
Definition: que0que.h:242
struct srv_slot_t * slot
The thread slot in the lock_sys->waiting_threads array protected by lock_sys->wait_mutex when writing...
Definition: que0que.h:286
thrs
list of thread nodes of the fork node
Definition: que0que.h:291
UNIV_INLINE dfield_t * que_node_get_val(que_node_t *node)
Gets pointer to the value dfield of a graph node.
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.
Definition: que0que.cc:121
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.
que_thr_state_t state
state of the query thread
Definition: que0que.h:257
que_common_t common
type: QUE_NODE_FORK
Definition: que0que.h:311
#define UT_LIST_NODE_T(TYPE)
Definition: innodb_utility.h:40
que_t * graph
query graph of this node
Definition: que0que.h:312
Thread slot in the thread table.
Definition: srv0srv.h:1190
ulint magic_n
magic number to catch memory corruption
Definition: que0que.h:253
ulint resource
resource usage of the query thread thus far
Definition: que0que.h:272
bool que_thr_stop(que_thr_t *thr)
Stops a query thread if graph or trx is in a state requiring it.
Definition: que0que.cc:592