/**************************************************//**
@file eval/eval0proc.cc
Executes SQL stored procedures and their control structures
Created 1/20/1998 Heikki Tuuri
*******************************************************/
#include"eval0proc.h"
/**********************************************************************//**
Performs an execution step of an if-statement node.
@return query thread to run next or NULL */
que_thr_t*
if_step( /*====*/
que_thr_t* thr) /*!< in: query thread */
{
if_node_t* node;
elsif_node_t* elsif_node;
break;
}
}
} else {
thr->run_node = NULL;
}
} else { /* Move to the next statement */
ut_ad(que_node_get_next(thr->prev_node) == NULL);
thr->run_node = NULL;
}
if (thr->run_node == NULL) {
thr->run_node = que_node_get_parent(node);
}
return(thr);
}
/**********************************************************************//**
Performs an execution step of a while-statement node.
@return query thread to run next or NULL */
que_thr_t*
while_step( /*=======*/
que_thr_t* thr) /*!< in: query thread */
{
while_node_t* node;
/**********************************************************************//**
Performs an execution step of an assignment statement node.
@return query thread to run next or NULL */
que_thr_t*
assign_step( /*========*/
que_thr_t* thr) /*!< in: query thread */
{
assign_node_t* node;
/**********************************************************************//**
Performs an execution step of a for-loop node.
@return query thread to run next or NULL */
que_thr_t*
for_step( /*=====*/
que_thr_t* thr) /*!< in: query thread */
{
for_node_t* node;
que_node_t* parent;
lint loop_var_value;
ut_ad(thr);
node = static_cast<for_node_t*>(thr->run_node);
ut_ad(que_node_get_type(node) == QUE_NODE_FOR);
parent = que_node_get_parent(node);
if (thr->prev_node != parent) {
/* Move to the next statement */
thr->run_node = que_node_get_next(thr->prev_node);
/**********************************************************************//**
Performs an execution step of an exit statement node.
@return query thread to run next or NULL */
que_thr_t*
exit_step( /*======*/
que_thr_t* thr) /*!< in: query thread */
{
exit_node_t* node;
que_node_t* loop_node;
ut_ad(thr);
node = static_cast<exit_node_t*>(thr->run_node);
ut_ad(que_node_get_type(node) == QUE_NODE_EXIT);
/* Loops exit by setting thr->run_node as the loop node's parent, so
find our containing loop node and get its parent. */
/* If someone uses an EXIT statement outside of a loop, this will
trigger. */
ut_a(loop_node);
thr->run_node = que_node_get_parent(loop_node);
return(thr);
}
/**********************************************************************//**
Performs an execution step of a return-statement node.
@return query thread to run next or NULL */
que_thr_t*
return_step( /*========*/
que_thr_t* thr) /*!< in: query thread */
{
return_node_t* node;
que_node_t* parent;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.