diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-29 15:15:51 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-29 15:15:51 +0200 |
commit | 6ffd555155360ad13ab9bf1f8b050f3d46edb17d (patch) | |
tree | e570d4c59b3a7727411fc9c0a6fe51a149353d6f /sql/item_strfunc.h | |
parent | c865e96362b75d1d59ac31c9a2fd34ee1ccdf058 (diff) | |
download | mariadb-git-6ffd555155360ad13ab9bf1f8b050f3d46edb17d.tar.gz |
Code that had to be changed so that CREATE ... SELECT ... always
creates proper column types, out of any function, expression or from
other tables.
mysql-test/r/create.result:
This is a result for the test which creates all proper column types
out of CREATE ... SELECT ...
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index e92dcf806db..870edffeb7e 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -35,6 +35,11 @@ public: double val(); enum Item_result result_type () const { return STRING_RESULT; } void left_right_max_length(); + Field *tmp_table_field(TABLE *t_arg) + { + if (!t_arg) return result_field; + return (max_length > 255) ? (Field *)new Field_blob(max_length,maybe_null, name,t_arg, binary) : (Field *) new Field_string(max_length,maybe_null, name,t_arg, binary); + } }; class Item_func_md5 :public Item_str_func |