1
/******************************************************
2
SQL evaluator: evaluates simple data structures, like expressions, in
7
Created 12/29/1997 Heikki Tuuri
8
*******************************************************/
14
#include "que0types.h"
16
#include "pars0pars.h"
18
/*********************************************************************
19
Free the buffer from global dynamic memory for a value of a que_node,
20
if it has been allocated in the above function. The freeing for pushed
21
column values is done in sel_col_prefetch_buf_free. */
24
eval_node_free_val_buf(
25
/*===================*/
26
que_node_t* node); /* in: query graph node */
27
/*********************************************************************
28
Evaluates a symbol table symbol. */
33
sym_node_t* sym_node); /* in: symbol table node */
34
/*********************************************************************
35
Evaluates an expression. */
40
que_node_t* exp_node); /* in: expression */
41
/*********************************************************************
42
Sets an integer value as the value of an expression node. */
45
eval_node_set_int_val(
46
/*==================*/
47
que_node_t* node, /* in: expression node */
48
lint val); /* in: value to set */
49
/*********************************************************************
50
Gets an integer value from an expression node. */
53
eval_node_get_int_val(
54
/*==================*/
55
/* out: integer value */
56
que_node_t* node); /* in: expression node */
57
/*********************************************************************
58
Copies a binary string value as the value of a query graph node. Allocates a
59
new buffer if necessary. */
62
eval_node_copy_and_alloc_val(
63
/*=========================*/
64
que_node_t* node, /* in: query graph node */
65
byte* str, /* in: binary string */
66
ulint len); /* in: string length or UNIV_SQL_NULL */
67
/*********************************************************************
68
Copies a query node value to another node. */
73
que_node_t* node1, /* in: node to copy to */
74
que_node_t* node2); /* in: node to copy from */
75
/*********************************************************************
76
Gets a iboolean value from a query node. */
79
eval_node_get_ibool_val(
80
/*====================*/
81
/* out: iboolean value */
82
que_node_t* node); /* in: query graph node */
83
/*********************************************************************
84
Evaluates a comparison node. */
89
/* out: the result of the comparison */
90
func_node_t* cmp_node); /* in: comparison node */
94
#include "eval0eval.ic"