diff options
author | monty@hundin.mysql.fi <> | 2002-08-08 20:49:06 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-08-08 20:49:06 +0300 |
commit | 8832927d5c843084664e4ec861f5ebb82d424ed8 (patch) | |
tree | 3a864bb27bc717c690f6d83d2aa5afbc850401a4 /sql/item_func.cc | |
parent | 77296b3f67f50eb5dd2ed804841d28c6b4e3f103 (diff) | |
download | mariadb-git-8832927d5c843084664e4ec861f5ebb82d424ed8.tar.gz |
Added nety_retry_count as a changeable variable
Make safe_mysqld a symlink to mysqld_safe in binary distribution
Fixed problem with CTRL-C when using mysqld --bootstrap
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 3e5c082033b..8b05109b289 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -166,6 +166,36 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const } +Field *Item_func::tmp_table_field(TABLE *t_arg) +{ + Field *res; + LINT_INIT(res); + + if (!t_arg) + return result_field; + switch (args[0]->result_type()) { + case INT_RESULT: + if (max_length > 11) + res= new Field_longlong(max_length, maybe_null, name, t_arg, + unsigned_flag); + else + res= new Field_long(max_length, maybe_null, name, t_arg, + unsigned_flag); + break; + case REAL_RESULT: + res= new Field_double(max_length, maybe_null, name, t_arg, decimals); + break; + case STRING_RESULT: + if (max_length > 255) + res= new Field_blob(max_length, maybe_null, name, t_arg, binary); + else + res= new Field_string(max_length, maybe_null, name, t_arg, binary); + break; + } + return res; +} + + String *Item_real_func::val_str(String *str) { double nr=val(); |