summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-11-24 15:47:19 +0200
committermonty@mashka.mysql.fi <>2002-11-24 15:47:19 +0200
commitdfb60ca085104981a35f2ba72fa30a01b1befa07 (patch)
treeed4766483373d3e3ccd10186eea178ace4e50ae4 /sql/item_timefunc.h
parente60050c4dd652c7a431aebeb95b7dd944be87bf8 (diff)
downloadmariadb-git-dfb60ca085104981a35f2ba72fa30a01b1befa07.tar.gz
Added new ANSI functions LOCALTIME, LOCALTIMESTAMP and CURRENT_USER
Added CEIL as an alias for CEILING Cleaned up CHECK constraint handling. (We don't anymore require braces after CHECK) Added casting to CHAR.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 0fe487b7983..c0255e71d27 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -410,6 +410,7 @@ public:
unsigned int size_of() { return sizeof(*this);}
};
+
class Item_extract :public Item_int_func
{
const interval_type int_type;
@@ -424,10 +425,12 @@ class Item_extract :public Item_int_func
unsigned int size_of() { return sizeof(*this);}
};
+
class Item_typecast :public Item_str_func
{
public:
Item_typecast(Item *a) :Item_str_func(a) {}
+ const char *func_name() const { return "char"; }
String *val_str(String *a)
{ a=args[0]->val_str(a); null_value=args[0]->null_value; return a; }
void fix_length_and_dec() { max_length=args[0]->max_length; }
@@ -435,6 +438,14 @@ public:
};
+class Item_char_typecast :public Item_typecast
+{
+public:
+ Item_char_typecast(Item *a) :Item_typecast(a) {}
+ void fix_length_and_dec() { binary=0; max_length=args[0]->max_length; }
+};
+
+
class Item_date_typecast :public Item_typecast
{
public:
@@ -450,6 +461,7 @@ public:
}
};
+
class Item_time_typecast :public Item_typecast
{
public:
@@ -465,6 +477,7 @@ public:
}
};
+
class Item_datetime_typecast :public Item_typecast
{
public: