diff options
author | unknown <monty@hundin.mysql.fi> | 2002-01-03 00:46:43 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-01-03 00:46:43 +0200 |
commit | b79170b7fd6b77bbc6cc083fbcaa13faf7f02f92 (patch) | |
tree | 4e18e3ee4d74189f2a784d419334e02f025eacd1 /sql/item_create.cc | |
parent | 301cdf9f240106978b04d4f8044b24e4a3fa6d00 (diff) | |
download | mariadb-git-b79170b7fd6b77bbc6cc083fbcaa13faf7f02f92.tar.gz |
New CAST syntax
Cleanup of multi-table-delete in sql_yacc.yy
Changed syntax of MAXIMUM QUERIES PER HOUR to MAX_QUERIES_PER_HOUR to
not get too many reserved words.
Docs/manual.texi:
Updated information about CAST
mysql-test/r/bigint.result:
New CAST syntax
mysql-test/r/create.result:
New CAST syntax
mysql-test/r/variables.result:
Fix after merge with 3.23
mysql-test/t/bigint.test:
New CAST syntax
mysql-test/t/create.test:
New CAST syntax
sql/item_create.cc:
New CAST syntax
sql/item_func.h:
New CAST syntax
sql/item_timefunc.cc:
New CAST syntax
sql/item_timefunc.h:
New CAST syntax
sql/lex.h:
Changed syntax to MAX_QUERIES_PER_HOUR to not get too many reserved words.
sql/mysql_priv.h:
Cleanup multi-delete
sql/sql_parse.cc:
Cleanup multi-delete
sql/sql_yacc.yy:
Cleanup multi-delete.
New CAST syntax.
Removed some restricted words.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index a9567414b0b..4b60ad1bf56 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -393,3 +393,18 @@ Item *create_wait_for_master_pos(Item* a, Item* b) current_thd->safe_to_cache_query=0; return new Item_master_pos_wait(a, b); } + +Item *create_func_cast(Item *a, Item_cast cast_type) +{ + Item *res; + LINT_INIT(res); + switch (cast_type) { + case ITEM_CAST_BINARY: res= new Item_func_binary(a); break; + case ITEM_CAST_SIGNED_INT: res= new Item_func_signed(a); break; + case ITEM_CAST_UNSIGNED_INT: res= new Item_func_unsigned(a); break; + case ITEM_CAST_DATE: res= new Item_date_typecast(a); break; + case ITEM_CAST_TIME: res= new Item_time_typecast(a); break; + case ITEM_CAST_DATETIME: res= new Item_datetime_typecast(a); break; + } + return res; +} |