diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2003-04-09 20:50:30 -0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2003-04-09 20:50:30 -0400 |
commit | 75bdeb1b21dca9266c077f9bade0e88bec716e9c (patch) | |
tree | bd0630d1e16baaeb815da46e7de6032c9f3d82e7 /sql/item_strfunc.h | |
parent | 90527436fa6901b1132c4cabd6f2a3b10adce226 (diff) | |
download | mariadb-git-75bdeb1b21dca9266c077f9bade0e88bec716e9c.tar.gz |
added compress/uncompress function
sql/mysql_priv.h:
added have_compress variable
sql/mysqld.cc:
added have_compress variable
sql/set_var.cc:
added have_compress variable
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 07b7eb2d165..3c5ab855970 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -771,6 +771,29 @@ public: const char *func_name() const { return "multipoint"; } }; +#ifdef HAVE_COMPRESS + +class Item_func_compress : public Item_str_func +{ + String buffer; +public: + Item_func_compress(Item *a):Item_str_func(a){} + String *val_str(String *); + void fix_length_and_dec(){max_length= (args[0]->max_length*120)/100+12;} + const char *func_name() const{return "compress";} +}; + +class Item_func_uncompress : public Item_str_func +{ + String buffer; +public: + Item_func_uncompress(Item *a):Item_str_func(a){} + String *val_str(String *); + void fix_length_and_dec(){max_length= MAX_BLOB_WIDTH;} + const char *func_name() const{return "uncompress";} +}; + +#endif /* class Item_func_multipoint :public Item_str_func |