~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Monty Taylor
  • Date: 2008-11-17 23:20:25 UTC
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081117232025-01m5jfd4l9cn93kb
Removed field.h from common_includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
}
359
359
 
360
360
 
 
361
int Item::decimal_int_part() const
 
362
{
 
363
  return my_decimal_int_part(decimal_precision(), decimals);
 
364
}
 
365
 
 
366
 
361
367
void Item::print(String *str, enum_query_type)
362
368
{
363
369
  str->append(full_name());
1265
1271
  tmp_field->decimals= field->decimals();
1266
1272
}
1267
1273
 
 
1274
 
 
1275
double Item_ident_for_show::val_real()
 
1276
{
 
1277
  return field->val_real();
 
1278
}
 
1279
 
 
1280
 
 
1281
int64_t Item_ident_for_show::val_int()
 
1282
{
 
1283
  return field->val_int();
 
1284
}
 
1285
 
 
1286
 
 
1287
String *Item_ident_for_show::val_str(String *str)
 
1288
{
 
1289
  return field->val_str(str);
 
1290
}
 
1291
 
 
1292
 
 
1293
my_decimal *Item_ident_for_show::val_decimal(my_decimal *dec)
 
1294
{
 
1295
  return field->val_decimal(dec);
 
1296
}
 
1297
 
 
1298
 
1268
1299
/**********************************************/
1269
1300
 
1270
1301
Item_field::Item_field(Field *f)
1599
1630
}
1600
1631
 
1601
1632
 
 
1633
enum Item_result Item_field::result_type () const
 
1634
{
 
1635
  return field->result_type();
 
1636
}
 
1637
 
 
1638
 
 
1639
Item_result Item_field::cast_to_int_type() const
 
1640
{
 
1641
  return field->cast_to_int_type();
 
1642
}
 
1643
 
 
1644
 
 
1645
enum_field_types Item_field::field_type() const
 
1646
{
 
1647
  return field->type();
 
1648
}
 
1649
 
 
1650
 
1602
1651
void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **)
1603
1652
{
1604
1653
  if (new_parent == depended_from)
1612
1661
}
1613
1662
 
1614
1663
 
 
1664
bool Item_field::is_null()
 
1665
{
 
1666
  return field->is_null();
 
1667
}
 
1668
 
 
1669
 
1615
1670
Item *Item_field::get_tmp_table_item(Session *session)
1616
1671
{
1617
1672
  Item_field *new_item= new Item_field(session, this);
3572
3627
  return;
3573
3628
}
3574
3629
 
 
3630
 
 
3631
bool Item_field::result_as_int64_t()
 
3632
{
 
3633
  return field->can_be_compared_as_int64_t();
 
3634
}
 
3635
 
 
3636
 
3575
3637
/**
3576
3638
  Find a field among specified multiple equalities.
3577
3639
 
3757
3819
}
3758
3820
 
3759
3821
 
 
3822
uint32_t Item_field::max_disp_length()
 
3823
{
 
3824
  return field->max_display_length();
 
3825
}
 
3826
 
 
3827
 
3760
3828
void Item::init_make_field(Send_field *tmp_field,
3761
3829
                           enum enum_field_types field_type_arg)
3762
3830
{
5722
5790
}
5723
5791
 
5724
5792
 
 
5793
bool Item_cache::eq_def(Field *field)
 
5794
{
 
5795
  return cached_field ? cached_field->eq_def (field) : false;
 
5796
}
 
5797
 
 
5798
 
5725
5799
void Item_cache_int::store(Item *item)
5726
5800
{
5727
5801
  value= item->val_int_result();
5823
5897
}
5824
5898
 
5825
5899
 
 
5900
Item_cache_str::Item_cache_str(const Item *item) :
 
5901
  Item_cache(), value(0),
 
5902
  is_varbinary(item->type() == FIELD_ITEM &&
 
5903
               ((const Item_field *) item)->field->type() ==
 
5904
               DRIZZLE_TYPE_VARCHAR &&
 
5905
               !((const Item_field *) item)->field->has_charset())
 
5906
{}
 
5907
 
5826
5908
void Item_cache_str::store(Item *item)
5827
5909
{
5828
5910
  value_buff.set(buffer, sizeof(buffer), item->collation.collation);