MySQL 9.1.0
Source Code Documentation
eval0eval.h File Reference

SQL evaluator: evaluates simple data structures, like expressions, in a query graph. More...

#include "pars0pars.h"
#include "pars0sym.h"
#include "que0types.h"
#include "univ.i"
#include "eval0eval.ic"

Go to the source code of this file.

Functions

void eval_node_free_val_buf (que_node_t *node)
 Free the buffer from global dynamic memory for a value of a que_node, if it has been allocated in the above function. More...
 
static void eval_sym (sym_node_t *sym_node)
 Evaluates a symbol table symbol. More...
 
static void eval_exp (que_node_t *exp_node)
 Evaluates an expression. More...
 
static void eval_node_set_int_val (que_node_t *node, lint val)
 Sets an integer value as the value of an expression node. More...
 
static lint eval_node_get_int_val (que_node_t *node)
 Gets an integer value from an expression node. More...
 
static void eval_node_copy_and_alloc_val (que_node_t *node, const byte *str, ulint len)
 Copies a binary string value as the value of a query graph node. More...
 
static void eval_node_copy_val (que_node_t *node1, que_node_t *node2)
 Copies a query node value to another node. More...
 
static bool eval_node_get_bool_val (que_node_t *node)
 Gets a boolean value from a query node. More...
 
bool eval_cmp (func_node_t *cmp_node)
 Evaluates a comparison node. More...
 

Detailed Description

SQL evaluator: evaluates simple data structures, like expressions, in a query graph.

Created 12/29/1997 Heikki Tuuri

Function Documentation

◆ eval_cmp()

bool eval_cmp ( func_node_t cmp_node)

Evaluates a comparison node.

Returns
the result of the comparison in: comparison node
Parameters
cmp_nodein: comparison node

◆ eval_exp()

static void eval_exp ( que_node_t exp_node)
inlinestatic

Evaluates an expression.

in: expression

◆ eval_node_copy_and_alloc_val()

static void eval_node_copy_and_alloc_val ( que_node_t node,
const byte str,
ulint  len 
)
inlinestatic

Copies a binary string value as the value of a query graph node.

Allocates a new buffer if necessary.

Parameters
[in]nodequery graph node
[in]strbinary string
[in]lenstring length or UNIV_SQL_NULL

◆ eval_node_copy_val()

static void eval_node_copy_val ( que_node_t node1,
que_node_t node2 
)
inlinestatic

Copies a query node value to another node.

Parameters
[in]node1node to copy to
[in]node2node to copy from

◆ eval_node_free_val_buf()

void eval_node_free_val_buf ( que_node_t node)

Free the buffer from global dynamic memory for a value of a que_node, if it has been allocated in the above function.

The freeing for pushed column values is done in sel_col_prefetch_buf_free. in: query graph node

The freeing for pushed column values is done in sel_col_prefetch_buf_free.

Parameters
nodein: query graph node

◆ eval_node_get_bool_val()

static bool eval_node_get_bool_val ( que_node_t node)
inlinestatic

Gets a boolean value from a query node.

Returns
boolean value in: query graph node

◆ eval_node_get_int_val()

static lint eval_node_get_int_val ( que_node_t node)
inlinestatic

Gets an integer value from an expression node.

Returns
integer value in: expression node

◆ eval_node_set_int_val()

static void eval_node_set_int_val ( que_node_t node,
lint  val 
)
inlinestatic

Sets an integer value as the value of an expression node.

Parameters
[in]nodeexpression node
[in]valvalue to set

◆ eval_sym()

static void eval_sym ( sym_node_t sym_node)
inlinestatic

Evaluates a symbol table symbol.

in: symbol table node