Added get_item() to Cached_item_item and get_value to the Cached_item

This commit is contained in:
Varun Gupta 2017-06-26 01:55:05 +05:30
parent 280945bf29
commit 129626f171

View file

@ -5303,6 +5303,8 @@ public:
/* Compare the cached value with the source value, without copying */
virtual int cmp_read_only()=0;
virtual void clear()=0;
virtual ~Cached_item(); /*line -e1509 */
};
@ -5320,6 +5322,14 @@ public:
cmp();
item= save;
}
Item* get_item()
{
return item;
}
void clear()
{
null_value= false;
}
};
class Cached_item_str :public Cached_item_item
@ -5330,6 +5340,10 @@ public:
Cached_item_str(THD *thd, Item *arg);
bool cmp(void);
int cmp_read_only();
void clear()
{
null_value= false;
}
~Cached_item_str(); // Deallocate String:s
};
@ -5341,6 +5355,12 @@ public:
Cached_item_real(Item *item_par) :Cached_item_item(item_par),value(0.0) {}
bool cmp(void);
int cmp_read_only();
double get_value(){ return value;}
void clear()
{
value=0.0;
null_value= false;
}
};
class Cached_item_int :public Cached_item_item
@ -5350,6 +5370,12 @@ public:
Cached_item_int(Item *item_par) :Cached_item_item(item_par),value(0) {}
bool cmp(void);
int cmp_read_only();
longlong get_value(){ return value;}
void clear()
{
value=0.0;
null_value= false;
}
};
@ -5360,6 +5386,12 @@ public:
Cached_item_decimal(Item *item_par);
bool cmp(void);
int cmp_read_only();
my_decimal get_value(){ return value;};
void clear()
{
null_value= false;
my_decimal_set_zero(&value);
}
};
class Cached_item_field :public Cached_item
@ -5377,6 +5409,10 @@ public:
}
bool cmp(void);
int cmp_read_only();
void clear()
{
null_value= false;
}
};
class Item_default_value : public Item_field