~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/eval0eval.h

  • Committer: Monty Taylor
  • Date: 2009-08-12 06:25:19 UTC
  • mto: (1114.1.1 innodb-plugin-merge)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: mordred@inaugust.com-20090812062519-cij02mrrunvnxblt
Tags: innodb-plugin-1.0.4
InnoDB Plugin 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/******************************************************
 
19
/**************************************************//**
 
20
@file include/eval0eval.h
20
21
SQL evaluator: evaluates simple data structures, like expressions, in
21
22
a query graph
22
23
 
31
32
#include "pars0sym.h"
32
33
#include "pars0pars.h"
33
34
 
34
 
/*********************************************************************
 
35
/*****************************************************************//**
35
36
Free the buffer from global dynamic memory for a value of a que_node,
36
37
if it has been allocated in the above function. The freeing for pushed
37
38
column values is done in sel_col_prefetch_buf_free. */
39
40
void
40
41
eval_node_free_val_buf(
41
42
/*===================*/
42
 
        que_node_t*     node);  /* in: query graph node */
43
 
/*********************************************************************
 
43
        que_node_t*     node);  /*!< in: query graph node */
 
44
/*****************************************************************//**
44
45
Evaluates a symbol table symbol. */
45
46
UNIV_INLINE
46
47
void
47
48
eval_sym(
48
49
/*=====*/
49
 
        sym_node_t*     sym_node);      /* in: symbol table node */
50
 
/*********************************************************************
 
50
        sym_node_t*     sym_node);      /*!< in: symbol table node */
 
51
/*****************************************************************//**
51
52
Evaluates an expression. */
52
53
UNIV_INLINE
53
54
void
54
55
eval_exp(
55
56
/*=====*/
56
 
        que_node_t*     exp_node);      /* in: expression */
57
 
/*********************************************************************
 
57
        que_node_t*     exp_node);      /*!< in: expression */
 
58
/*****************************************************************//**
58
59
Sets an integer value as the value of an expression node. */
59
60
UNIV_INLINE
60
61
void
61
62
eval_node_set_int_val(
62
63
/*==================*/
63
 
        que_node_t*     node,   /* in: expression node */
64
 
        lint            val);   /* in: value to set */
65
 
/*********************************************************************
66
 
Gets an integer value from an expression node. */
 
64
        que_node_t*     node,   /*!< in: expression node */
 
65
        lint            val);   /*!< in: value to set */
 
66
/*****************************************************************//**
 
67
Gets an integer value from an expression node.
 
68
@return integer value */
67
69
UNIV_INLINE
68
70
lint
69
71
eval_node_get_int_val(
70
72
/*==================*/
71
 
                                /* out: integer value */
72
 
        que_node_t*     node);  /* in: expression node */
73
 
/*********************************************************************
 
73
        que_node_t*     node);  /*!< in: expression node */
 
74
/*****************************************************************//**
74
75
Copies a binary string value as the value of a query graph node. Allocates a
75
76
new buffer if necessary. */
76
77
UNIV_INLINE
77
78
void
78
79
eval_node_copy_and_alloc_val(
79
80
/*=========================*/
80
 
        que_node_t*     node,   /* in: query graph node */
81
 
        const byte*     str,    /* in: binary string */
82
 
        ulint           len);   /* in: string length or UNIV_SQL_NULL */
83
 
/*********************************************************************
 
81
        que_node_t*     node,   /*!< in: query graph node */
 
82
        const byte*     str,    /*!< in: binary string */
 
83
        ulint           len);   /*!< in: string length or UNIV_SQL_NULL */
 
84
/*****************************************************************//**
84
85
Copies a query node value to another node. */
85
86
UNIV_INLINE
86
87
void
87
88
eval_node_copy_val(
88
89
/*===============*/
89
 
        que_node_t*     node1,  /* in: node to copy to */
90
 
        que_node_t*     node2); /* in: node to copy from */
91
 
/*********************************************************************
92
 
Gets a iboolean value from a query node. */
 
90
        que_node_t*     node1,  /*!< in: node to copy to */
 
91
        que_node_t*     node2); /*!< in: node to copy from */
 
92
/*****************************************************************//**
 
93
Gets a iboolean value from a query node.
 
94
@return iboolean value */
93
95
UNIV_INLINE
94
96
ibool
95
97
eval_node_get_ibool_val(
96
98
/*====================*/
97
 
                                /* out: iboolean value */
98
 
        que_node_t*     node);  /* in: query graph node */
99
 
/*********************************************************************
100
 
Evaluates a comparison node. */
 
99
        que_node_t*     node);  /*!< in: query graph node */
 
100
/*****************************************************************//**
 
101
Evaluates a comparison node.
 
102
@return the result of the comparison */
101
103
UNIV_INTERN
102
104
ibool
103
105
eval_cmp(
104
106
/*=====*/
105
 
                                        /* out: the result of the comparison */
106
 
        func_node_t*    cmp_node);      /* in: comparison node */
 
107
        func_node_t*    cmp_node);      /*!< in: comparison node */
107
108
 
108
109
 
109
110
#ifndef UNIV_NONINL