1
/******************************************************
2
Executes SQL stored procedures and their control structures
6
Created 1/20/1998 Heikki Tuuri
7
*******************************************************/
11
#include "eval0eval.h"
13
/**************************************************************************
14
Performs an execution step of a procedure node. */
19
/* out: query thread to run next or NULL */
20
que_thr_t* thr) /* in: query thread */
27
ut_ad(que_node_get_type(node) == QUE_NODE_PROC);
29
if (thr->prev_node == que_node_get_parent(node)) {
30
/* Start execution from the first statement in the statement
33
thr->run_node = node->stat_list;
35
/* Move to the next statement */
36
ut_ad(que_node_get_next(thr->prev_node) == NULL);
41
if (thr->run_node == NULL) {
42
thr->run_node = que_node_get_parent(node);
48
/**************************************************************************
49
Performs an execution step of a procedure call node. */
54
/* out: query thread to run next or NULL */
55
que_thr_t* thr) /* in: query thread */
62
ut_ad(que_node_get_type(node) == QUE_NODE_FUNC);
64
/* Evaluate the procedure */
68
thr->run_node = que_node_get_parent(node);