Item *Item_cache_int::convert_to_basic_const_item(THD *thd)
{
  Item *new_item;
  DBUG_ASSERT(value_cached || example != 0);
  if (!value_cached)
    cache_value();
  new_item= null_value ?
            (Item*) new (thd->mem_root) Item_null(thd) :
	    (Item*) new (thd->mem_root) Item_int(thd, val_int(), max_length);
  return new_item;
} 
Item *Item_cache_int::convert_to_basic_const_item(THD *thd)
{
  Item *new_item;
  DBUG_ASSERT(value_cached || example != 0);
  if (!value_cached)
    cache_value();
  new_item= null_value ?
            (Item*) new (thd->mem_root) Item_null(thd) :
	    (Item*) new (thd->mem_root) Item_int(thd, val_int(), max_length);
  return new_item;
} 