diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index 1ea76731fd3..47c7541d3e3 100644 --- a/sql/item.h +++ b/sql/item.h @@ -19,6 +19,7 @@ #pragma interface /* gcc class implementation */ #endif +class CONVERT; class Protocol; struct st_table_list; void item_init(void); /* Init item functions */ @@ -63,6 +64,10 @@ public: virtual int save_safe_in_field(Field *field) { return save_in_field(field, 1); } virtual bool send(Protocol *protocol, String *str); +#ifdef EMBEDDED_LIBRARY + virtual bool embedded_send(const CONVERT *convert, CHARSET_INFO *charset, MEM_ROOT *alloc, + char **result, ulong *length); +#endif virtual bool eq(const Item *, bool binary_cmp) const; virtual Item_result result_type () const { return REAL_RESULT; } virtual enum_field_types field_type() const; @@ -199,6 +204,10 @@ public: longlong val_int_result(); String *str_result(String* tmp); bool send(Protocol *protocol, String *str_arg); +#ifdef EMBEDDED_LIBRARY + bool embedded_send(const CONVERT *convert, CHARSET_INFO *charset, MEM_ROOT *alloc, + char **result, ulong *length); +#endif bool fix_fields(THD *, struct st_table_list *, Item **); void make_field(Send_field *tmp_field); int save_in_field(Field *field,bool no_conversions); @@ -231,6 +240,11 @@ public: String *val_str(String *str); int save_in_field(Field *field, bool no_conversions); int save_safe_in_field(Field *field); + bool send(Protocol *protocol, String *str); +#ifdef EMBEDDED_LIBRARY + bool embedded_send(const CONVERT *convert, CHARSET_INFO *charset, MEM_ROOT *alloc, + char **result, ulong *length); +#endif enum Item_result result_type () const { return STRING_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_NULL; } bool fix_fields(THD *thd, struct st_table_list *list, Item **item) @@ -239,7 +253,6 @@ public: max_length=0; return res; } - bool send(Protocol *protocol, String *str); bool basic_const_item() const { return 1; } Item *new_item() { return new Item_null(name); } bool is_null() { return 1; } @@ -532,6 +545,11 @@ public: return (null_value=(*ref)->get_date(ltime,fuzzydate)); } bool send(Protocol *prot, String *tmp){ return (*ref)->send(prot, tmp); } +#ifdef EMBEDDED_LIBRARY + bool embedded_send(const CONVERT *convert, CHARSET_INFO *charset, MEM_ROOT *alloc, + char **result, ulong *length) + { return (*ref)->embedded_send(convert, charset, alloc, result, length); } +#endif void make_field(Send_field *field) { (*ref)->make_field(field); } bool fix_fields(THD *, struct st_table_list *, Item **); int save_in_field(Field *field, bool no_conversions) |