~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/item.h

  • Committer: Brian Aker
  • Date: 2008-07-13 22:21:51 UTC
  • Revision ID: brian@tangent.org-20080713222151-fv2tcpbsc829j2oc
Ulonglong to uint64_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
  virtual void set_zero(Hybrid_type *val) const { val->real= 0.0; }
163
163
  virtual void add(Hybrid_type *val, Field *f) const
164
164
  { val->real+= f->val_real(); }
165
 
  virtual void div(Hybrid_type *val, ulonglong u) const
166
 
  { val->real/= ulonglong2double(u); }
 
165
  virtual void div(Hybrid_type *val, uint64_t u) const
 
166
  { val->real/= uint64_t2double(u); }
167
167
 
168
168
  virtual longlong val_int(Hybrid_type *val,
169
169
                           bool unsigned_flag __attribute__((__unused__))) const
187
187
  /* Hybrid_type operations. */
188
188
  virtual void set_zero(Hybrid_type *val) const;
189
189
  virtual void add(Hybrid_type *val, Field *f) const;
190
 
  virtual void div(Hybrid_type *val, ulonglong u) const;
 
190
  virtual void div(Hybrid_type *val, uint64_t u) const;
191
191
 
192
192
  virtual longlong val_int(Hybrid_type *val, bool unsigned_flag) const;
193
193
  virtual double val_real(Hybrid_type *val) const;
212
212
  { val->integer= 0; }
213
213
  virtual void add(Hybrid_type *val, Field *f) const
214
214
  { val->integer+= f->val_int(); }
215
 
  virtual void div(Hybrid_type *val, ulonglong u) const
 
215
  virtual void div(Hybrid_type *val, uint64_t u) const
216
216
  { val->integer/= (longlong) u; }
217
217
 
218
218
  virtual longlong val_int(Hybrid_type *val,
616
616
    This is just a shortcut to avoid the cast. You should still use
617
617
    unsigned_flag to check the sign of the item.
618
618
  */
619
 
  inline ulonglong val_uint() { return (ulonglong) val_int(); }
 
619
  inline uint64_t val_uint() { return (uint64_t) val_int(); }
620
620
  /*
621
621
    Return string representation of this item object.
622
622
 
1376
1376
  Item_int(longlong i,uint length= MY_INT64_NUM_DECIMAL_DIGITS)
1377
1377
    :value(i)
1378
1378
    { max_length=length; fixed= 1; }
1379
 
  Item_int(ulonglong i, uint length= MY_INT64_NUM_DECIMAL_DIGITS)
 
1379
  Item_int(uint64_t i, uint length= MY_INT64_NUM_DECIMAL_DIGITS)
1380
1380
    :value((longlong)i)
1381
1381
    { max_length=length; fixed= 1; unsigned_flag= 1; }
1382
1382
  Item_int(const char *str_arg,longlong i,uint length) :value(i)
1404
1404
{
1405
1405
public:
1406
1406
  Item_uint(const char *str_arg, uint length);
1407
 
  Item_uint(ulonglong i) :Item_int((ulonglong) i, 10) {}
 
1407
  Item_uint(uint64_t i) :Item_int((uint64_t) i, 10) {}
1408
1408
  Item_uint(const char *str_arg, longlong i, uint length);
1409
1409
  double val_real()
1410
 
    { assert(fixed == 1); return ulonglong2double((ulonglong)value); }
 
1410
    { assert(fixed == 1); return uint64_t2double((uint64_t)value); }
1411
1411
  String *val_str(String*);
1412
1412
  Item *clone_item() { return new Item_uint(name, value, max_length); }
1413
1413
  int save_in_field(Field *field, bool no_conversions);
1489
1489
    {
1490
1490
       return LONGLONG_MIN;
1491
1491
    }
1492
 
    else if (value >= (double) (ulonglong) LONGLONG_MAX)
 
1492
    else if (value >= (double) (uint64_t) LONGLONG_MAX)
1493
1493
    {
1494
1494
      return LONGLONG_MAX;
1495
1495
    }
1739
1739
  double val_real()
1740
1740
  { 
1741
1741
    assert(fixed == 1); 
1742
 
    return (double) (ulonglong) Item_hex_string::val_int();
 
1742
    return (double) (uint64_t) Item_hex_string::val_int();
1743
1743
  }
1744
1744
  longlong val_int();
1745
1745
  bool basic_const_item() const { return 1; }