diff options
author | unknown <sanja@askmonty.org> | 2009-12-08 23:47:54 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2009-12-08 23:47:54 +0200 |
commit | 08e4635fbabb4a4bea3a9b44057a2cd9b12d580f (patch) | |
tree | 9de56c7859229fc3e173370d434fb24e1a367a1d /storage/xtradb/include/eval0eval.ic | |
parent | e4e1ae0d13da399d53bd91df791b149f3eae796b (diff) | |
parent | 27f4f67bd2f35bf710f1a4e4ddde0e42738a195d (diff) | |
download | mariadb-git-08e4635fbabb4a4bea3a9b44057a2cd9b12d580f.tar.gz |
merge 5.1-> 5.2
Diffstat (limited to 'storage/xtradb/include/eval0eval.ic')
-rw-r--r-- | storage/xtradb/include/eval0eval.ic | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/storage/xtradb/include/eval0eval.ic b/storage/xtradb/include/eval0eval.ic index a6330ae441f..fe767f39b00 100644 --- a/storage/xtradb/include/eval0eval.ic +++ b/storage/xtradb/include/eval0eval.ic @@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA *****************************************************************************/ -/****************************************************** +/**************************************************//** +@file include/eval0eval.ic SQL evaluator: evaluates simple data structures, like expressions, in a query graph @@ -27,41 +28,41 @@ Created 12/29/1997 Heikki Tuuri #include "rem0cmp.h" #include "pars0grm.h" -/********************************************************************* +/*****************************************************************//** Evaluates a function node. */ UNIV_INTERN void eval_func( /*======*/ - func_node_t* func_node); /* in: function node */ -/********************************************************************* + func_node_t* func_node); /*!< in: function node */ +/*****************************************************************//** Allocate a buffer from global dynamic memory for a value of a que_node. NOTE that this memory must be explicitly freed when the query graph is freed. If the node already has allocated buffer, that buffer is freed here. NOTE that this is the only function where dynamic memory should be -allocated for a query node val field. */ +allocated for a query node val field. +@return pointer to allocated buffer */ UNIV_INTERN byte* eval_node_alloc_val_buf( /*====================*/ - /* out: pointer to allocated buffer */ - que_node_t* node, /* in: query graph node; sets the val field + que_node_t* node, /*!< in: query graph node; sets the val field data field to point to the new buffer, and len field equal to size */ - ulint size); /* in: buffer size */ + ulint size); /*!< in: buffer size */ -/********************************************************************* -Allocates a new buffer if needed. */ +/*****************************************************************//** +Allocates a new buffer if needed. +@return pointer to buffer */ UNIV_INLINE byte* eval_node_ensure_val_buf( /*=====================*/ - /* out: pointer to buffer */ - que_node_t* node, /* in: query graph node; sets the val field + que_node_t* node, /*!< in: query graph node; sets the val field data field to point to the new buffer, and len field equal to size */ - ulint size) /* in: buffer size */ + ulint size) /*!< in: buffer size */ { dfield_t* dfield; byte* data; @@ -79,13 +80,13 @@ eval_node_ensure_val_buf( return(data); } -/********************************************************************* +/*****************************************************************//** Evaluates a symbol table symbol. */ UNIV_INLINE void eval_sym( /*=====*/ - sym_node_t* sym_node) /* in: symbol table node */ + sym_node_t* sym_node) /*!< in: symbol table node */ { ut_ad(que_node_get_type(sym_node) == QUE_NODE_SYMBOL); @@ -99,13 +100,13 @@ eval_sym( } } -/********************************************************************* +/*****************************************************************//** Evaluates an expression. */ UNIV_INLINE void eval_exp( /*=====*/ - que_node_t* exp_node) /* in: expression */ + que_node_t* exp_node) /*!< in: expression */ { if (que_node_get_type(exp_node) == QUE_NODE_SYMBOL) { @@ -117,14 +118,14 @@ eval_exp( eval_func(exp_node); } -/********************************************************************* +/*****************************************************************//** Sets an integer value as the value of an expression node. */ UNIV_INLINE void eval_node_set_int_val( /*==================*/ - que_node_t* node, /* in: expression node */ - lint val) /* in: value to set */ + que_node_t* node, /*!< in: expression node */ + lint val) /*!< in: value to set */ { dfield_t* dfield; byte* data; @@ -142,14 +143,14 @@ eval_node_set_int_val( mach_write_to_4(data, (ulint)val); } -/********************************************************************* -Gets an integer non-SQL null value from an expression node. */ +/*****************************************************************//** +Gets an integer non-SQL null value from an expression node. +@return integer value */ UNIV_INLINE lint eval_node_get_int_val( /*==================*/ - /* out: integer value */ - que_node_t* node) /* in: expression node */ + que_node_t* node) /*!< in: expression node */ { dfield_t* dfield; @@ -160,14 +161,14 @@ eval_node_get_int_val( return((int)mach_read_from_4(dfield_get_data(dfield))); } -/********************************************************************* -Gets a iboolean value from a query node. */ +/*****************************************************************//** +Gets a iboolean value from a query node. +@return iboolean value */ UNIV_INLINE ibool eval_node_get_ibool_val( /*====================*/ - /* out: iboolean value */ - que_node_t* node) /* in: query graph node */ + que_node_t* node) /*!< in: query graph node */ { dfield_t* dfield; byte* data; @@ -181,14 +182,14 @@ eval_node_get_ibool_val( return(mach_read_from_1(data)); } -/********************************************************************* +/*****************************************************************//** Sets a iboolean value as the value of a function node. */ UNIV_INLINE void eval_node_set_ibool_val( /*====================*/ - func_node_t* func_node, /* in: function node */ - ibool val) /* in: value to set */ + func_node_t* func_node, /*!< in: function node */ + ibool val) /*!< in: value to set */ { dfield_t* dfield; byte* data; @@ -208,16 +209,16 @@ eval_node_set_ibool_val( mach_write_to_1(data, val); } -/********************************************************************* +/*****************************************************************//** Copies a binary string value as the value of a query graph node. Allocates a new buffer if necessary. */ UNIV_INLINE void eval_node_copy_and_alloc_val( /*=========================*/ - que_node_t* node, /* in: query graph node */ - const byte* str, /* in: binary string */ - ulint len) /* in: string length or UNIV_SQL_NULL */ + que_node_t* node, /*!< in: query graph node */ + const byte* str, /*!< in: binary string */ + ulint len) /*!< in: string length or UNIV_SQL_NULL */ { byte* data; @@ -232,14 +233,14 @@ eval_node_copy_and_alloc_val( ut_memcpy(data, str, len); } -/********************************************************************* +/*****************************************************************//** Copies a query node value to another node. */ UNIV_INLINE void eval_node_copy_val( /*===============*/ - que_node_t* node1, /* in: node to copy to */ - que_node_t* node2) /* in: node to copy from */ + que_node_t* node1, /*!< in: node to copy to */ + que_node_t* node2) /*!< in: node to copy from */ { dfield_t* dfield2; |