diff options
author | unknown <hf@deer.(none)> | 2004-01-19 21:06:27 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-01-19 21:06:27 +0400 |
commit | b44c819bb61664b4b69680c0209b8627b40fe2b2 (patch) | |
tree | 68d020ad65ffc40d49179abe19fb94245bfbf5d6 /sql/item.h | |
parent | 584e137887326584e1f24d2061e75486d745584e (diff) | |
parent | 9af09d1266c5a354e6126f13feaea0a3680442d3 (diff) | |
download | mariadb-git-b44c819bb61664b4b69680c0209b8627b40fe2b2.tar.gz |
Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-4.1.1676
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/item.h b/sql/item.h index dc3a9114601..e9d34568350 100644 --- a/sql/item.h +++ b/sql/item.h @@ -882,13 +882,15 @@ public: void set_used_tables(table_map map) { used_table_map= map; } virtual bool allocate(uint i) { return 0; }; - virtual bool setup(Item *item) { example= item; return 0; }; - virtual void store(Item *)= 0; - void set_len_n_dec(uint32 max_len, uint8 dec) + virtual bool setup(Item *item) { - max_length= max_len; - decimals= dec; - } + example= item; + max_length= item->max_length; + decimals= item->decimals; + collation.set(item->collation); + return 0; + }; + virtual void store(Item *)= 0; enum Type type() const { return CACHE_ITEM; } static Item_cache* get_cache(Item_result type); table_map used_tables() const { return used_table_map; } @@ -913,7 +915,7 @@ class Item_cache_real: public Item_cache double value; public: Item_cache_real(): Item_cache() {} - + void store(Item *item); double val() { return value; } longlong val_int() { return (longlong) (value+(value > 0 ? 0.5 : -0.5)); } |