Skip to content
Permalink
Browse files
Added get_item() to Cached_item_item and get_value to the Cached_item
  • Loading branch information
varunraiko committed Nov 1, 2017
1 parent 280945b commit 129626f
Showing 1 changed file with 36 additions and 0 deletions.
@@ -5303,6 +5303,8 @@ class Cached_item :public Sql_alloc
/* 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 @@ class Cached_item_item : public Cached_item
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 @@ class Cached_item_str :public Cached_item_item
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 @@ class Cached_item_real :public Cached_item_item
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 @@ class Cached_item_int :public Cached_item_item
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 @@ class Cached_item_decimal :public Cached_item_item
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 @@ class Cached_item_field :public Cached_item
}
bool cmp(void);
int cmp_read_only();
void clear()
{
null_value= false;
}
};

class Item_default_value : public Item_field

0 comments on commit 129626f

Please sign in to comment.