mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 13:15:32 +02:00
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.
This commit is contained in:
parent
70a17cd5a7
commit
72da2e4c94
13 changed files with 138 additions and 36 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue