Item *Item_int_with_ref::clone_item(THD *thd)
{
  DBUG_ASSERT(ref->const_item());
  /*
    We need to evaluate the constant to make sure it works with
    parameter markers.
  */
  return (ref->unsigned_flag ?
          new (thd->mem_root)
          Item_uint(thd, ref->name.str, ref->val_int(), ref->max_length) :
          new (thd->mem_root)
          Item_int(thd, ref->name.str, ref->val_int(), ref->max_length));
}
Item *Item_int_with_ref::clone_item(THD *thd)
{
  DBUG_ASSERT(ref->const_item());
   
  return (ref->unsigned_flag ?
          new (thd->mem_root)
          Item_uint(thd, ref->name.str, ref->val_int(), ref->max_length) :
          new (thd->mem_root)
          Item_int(thd, ref->name.str, ref->val_int(), ref->max_length));
}