diff options
author | unknown <monty@mysql.com> | 2004-11-02 08:58:45 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-02 08:58:45 +0200 |
commit | 94839ddf5e23998c4e90776912f7d92a90277628 (patch) | |
tree | f21b1c5d561fe5ca25c7f1f93db8805c0f4f3940 /innobase/eval/eval0eval.c | |
parent | 46aa022aa6cf40801518d1be2c9e8e7ffcee9928 (diff) | |
parent | 61ac832464a48afcf85f8c302734aa01d4346c78 (diff) | |
download | mariadb-git-94839ddf5e23998c4e90776912f7d92a90277628.tar.gz |
merge with 4.0
Build-tools/mysql-copyright:
Auto merged
Docs/Support/texi2html:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/eval/eval0eval.c:
Auto merged
innobase/pars/pars0pars.c:
Auto merged
Diffstat (limited to 'innobase/eval/eval0eval.c')
-rw-r--r-- | innobase/eval/eval0eval.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/innobase/eval/eval0eval.c b/innobase/eval/eval0eval.c index ebb6cb1b7d9..5b2d1f857b1 100644 --- a/innobase/eval/eval0eval.c +++ b/innobase/eval/eval0eval.c @@ -627,7 +627,11 @@ eval_concat( } /********************************************************************* -Evaluates a predefined function node. */ +Evaluates a predefined function node. If the first argument is an integer, +this function looks at the second argument which is the integer length in +bytes, and converts the integer to a VARCHAR. +If the first argument is of some other type, this function converts it to +BINARY. */ UNIV_INLINE void eval_to_binary( @@ -638,12 +642,24 @@ eval_to_binary( que_node_t* arg2; dfield_t* dfield; byte* str1; + ulint len; ulint len1; arg1 = func_node->args; str1 = dfield_get_data(que_node_get_val(arg1)); + if (dtype_get_mtype(que_node_get_data_type(arg1)) != DATA_INT) { + + len = dfield_get_len(que_node_get_val(arg1)); + + dfield = que_node_get_val(func_node); + + dfield_set_data(dfield, str1, len); + + return; + } + arg2 = que_node_get_next(arg1); len1 = (ulint)eval_node_get_int_val(arg2); |