summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-11-24 15:47:19 +0200
committerunknown <monty@mashka.mysql.fi>2002-11-24 15:47:19 +0200
commit72da2e4c9463aeb80083fd53cc0e6f5091b5f4f7 (patch)
treeed4766483373d3e3ccd10186eea178ace4e50ae4 /sql/item_timefunc.h
parent70a17cd5a7aab52697b494cd8379fb78db15eeea (diff)
downloadmariadb-git-72da2e4c9463aeb80083fd53cc0e6f5091b5f4f7.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. mysql-test/r/bigint.result: Moved casting test to cast.test mysql-test/r/func_time.result: Test of new functions mysql-test/t/bigint.test: Moved casting test to cast.test mysql-test/t/func_time.test: Test of new functions sql/item_create.cc: Added casting to CHAR sql/item_func.h: Added casting to CHAR sql/item_timefunc.h: Added casting to CHAR sql/lex.h: Added new ANSI functions LOCALTIME, LOCALTIMESTAMP and CURRENT_USER Added CEIL as an alias for CEILING sql/sql_yacc.yy: Cleaned up CHECK constraint handling.
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: