summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-02-27 20:30:08 +0100
committerunknown <serg@serg.mylan>2004-02-27 20:30:08 +0100
commit83c04153bc02af520925a290f95b163ed047ffdb (patch)
treed0f8d063fcdfa4d4c0549be6ee8d1a3d49393175 /sql/item_strfunc.h
parent4e468f66cc48c1ede186103594fb8a4a00ce010e (diff)
downloadmariadb-git-83c04153bc02af520925a290f95b163ed047ffdb.tar.gz
my_gethwaddr() for linux/freebsd
UUID() function BitKeeper/etc/ignore: Added mysys/test_gethwaddr to the ignore list include/my_sys.h: my_gethwaddr() mysys/Makefile.am: my_gethwaddr sql/item_create.cc: UUID() function sql/item_create.h: UUID() function sql/item_strfunc.cc: UUID() function sql/item_strfunc.h: UUID() function sql/lex.h: UUID() function sql/mysql_priv.h: UUID() function sql/mysqld.cc: UUID() function sql/sql_class.cc: cleanup
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 4832ddbd1b1..859983f443d 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -153,7 +153,7 @@ class Item_str_conv :public Item_str_func
public:
Item_str_conv(Item *item) :Item_str_func(item) {}
void fix_length_and_dec()
- {
+ {
collation.set(args[0]->collation);
max_length = args[0]->max_length;
}
@@ -589,10 +589,10 @@ public:
Item_func_quote(Item *a) :Item_str_func(a) {}
const char *func_name() const { return "quote"; }
String *val_str(String *);
- void fix_length_and_dec()
- {
+ void fix_length_and_dec()
+ {
collation.set(args[0]->collation);
- max_length= args[0]->max_length * 2 + 2;
+ max_length= args[0]->max_length * 2 + 2;
}
};
@@ -600,7 +600,7 @@ class Item_func_conv_charset :public Item_str_func
{
CHARSET_INFO *conv_charset;
public:
- Item_func_conv_charset(Item *a, CHARSET_INFO *cs) :Item_str_func(a)
+ Item_func_conv_charset(Item *a, CHARSET_INFO *cs) :Item_str_func(a)
{ conv_charset=cs; }
String *val_str(String *);
void fix_length_and_dec();
@@ -625,7 +625,7 @@ public:
Item_func_charset(Item *a) :Item_str_func(a) {}
String *val_str(String *);
const char *func_name() const { return "charset"; }
- void fix_length_and_dec()
+ void fix_length_and_dec()
{
collation.set(system_charset_info);
max_length= 64 * collation.collation->mbmaxlen; // should be enough
@@ -691,3 +691,13 @@ public:
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
};
+#define UUID_LENGTH (8+1+4+1+4+1+4+1+12)
+class Item_func_uuid: public Item_str_func
+{
+public:
+ Item_func_uuid(): Item_str_func() {}
+ void fix_length_and_dec() {max_length= UUID_LENGTH; }
+ const char *func_name() const{ return "uuid"; }
+ String *val_str(String *);
+};
+