summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h92
1 files changed, 1 insertions, 91 deletions
diff --git a/sql/item.h b/sql/item.h
index 1bded7377ee..dacac2d725e 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3608,7 +3608,7 @@ public:
Base class to implement typed value caching Item classes
Item_copy_ classes are very similar to the corresponding Item_
- classes (e.g. Item_copy_int is similar to Item_int) but they add
+ classes (e.g. Item_copy_string is similar to Item_string) but they add
the following additional functionality to Item_ :
1. Nullability
2. Possibility to store the value not only on instantiation time,
@@ -3664,13 +3664,6 @@ protected:
}
public:
- /**
- Factory method to create the appropriate subclass dependent on the type of
- the original item.
-
- @param item the original item.
- */
- static Item_copy *create (Item *item);
/**
Update the cache with the value of the original item
@@ -3732,89 +3725,6 @@ public:
};
-class Item_copy_int : public Item_copy
-{
-protected:
- longlong cached_value;
-public:
- Item_copy_int (Item *i) : Item_copy(i) {}
- int save_in_field(Field *field, bool no_conversions);
-
- virtual String *val_str(String*);
- virtual my_decimal *val_decimal(my_decimal *);
- virtual double val_real()
- {
- return null_value ? 0.0 : (double) cached_value;
- }
- virtual longlong val_int()
- {
- return null_value ? LL(0) : cached_value;
- }
- virtual void copy();
-};
-
-
-class Item_copy_uint : public Item_copy_int
-{
-public:
- Item_copy_uint (Item *item) : Item_copy_int(item)
- {
- unsigned_flag= 1;
- }
-
- String *val_str(String*);
- double val_real()
- {
- return null_value ? 0.0 : (double) (ulonglong) cached_value;
- }
-};
-
-
-class Item_copy_float : public Item_copy
-{
-protected:
- double cached_value;
-public:
- Item_copy_float (Item *i) : Item_copy(i) {}
- int save_in_field(Field *field, bool no_conversions);
-
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *);
- double val_real()
- {
- return null_value ? 0.0 : cached_value;
- }
- longlong val_int()
- {
- return (longlong) rint(val_real());
- }
- void copy()
- {
- cached_value= item->val_real();
- null_value= item->null_value;
- }
-};
-
-
-class Item_copy_decimal : public Item_copy
-{
-protected:
- my_decimal cached_value;
-public:
- Item_copy_decimal (Item *i) : Item_copy(i) {}
- int save_in_field(Field *field, bool no_conversions);
-
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *)
- {
- return null_value ? NULL: &cached_value;
- }
- double val_real();
- longlong val_int();
- void copy();
-};
-
-
/*
Cached_item_XXX objects are not exactly caches. They do the following: