~capttofu/drizzle/clientsplit

« back to all changes in this revision

Viewing changes to server/item.h

Merge with monty's tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1199
1199
  int save_safe_in_field(Field *field);
1200
1200
  bool send(Protocol *protocol, String *str);
1201
1201
  enum Item_result result_type () const { return STRING_RESULT; }
1202
 
  enum_field_types field_type() const   { return MYSQL_TYPE_NULL; }
 
1202
  enum_field_types field_type() const   { return DRIZZLE_TYPE_NULL; }
1203
1203
  bool basic_const_item() const { return 1; }
1204
1204
  Item *clone_item() { return new Item_null(name); }
1205
1205
  bool is_null() { return 1; }
1286
1286
    Used when this item is used in a temporary table.
1287
1287
    This is NOT placeholder metadata sent to client, as this value
1288
1288
    is assigned after sending metadata (in setup_one_conversion_function).
1289
 
    For example in case of 'SELECT ?' you'll get MYSQL_TYPE_STRING both
 
1289
    For example in case of 'SELECT ?' you'll get DRIZZLE_TYPE_STRING both
1290
1290
    in result set and placeholders metadata, no matter what type you will
1291
1291
    supply for this placeholder in mysql_stmt_execute.
1292
1292
  */
1384
1384
  Item_int(const char *str_arg, uint length=64);
1385
1385
  enum Type type() const { return INT_ITEM; }
1386
1386
  enum Item_result result_type () const { return INT_RESULT; }
1387
 
  enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
 
1387
  enum_field_types field_type() const { return DRIZZLE_TYPE_LONGLONG; }
1388
1388
  int64_t val_int() { assert(fixed == 1); return value; }
1389
1389
  double val_real() { assert(fixed == 1); return (double) value; }
1390
1390
  my_decimal *val_decimal(my_decimal *);
1433
1433
 
1434
1434
  enum Type type() const { return DECIMAL_ITEM; }
1435
1435
  enum Item_result result_type () const { return DECIMAL_RESULT; }
1436
 
  enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; }
 
1436
  enum_field_types field_type() const { return DRIZZLE_TYPE_NEWDECIMAL; }
1437
1437
  int64_t val_int();
1438
1438
  double val_real();
1439
1439
  String *val_str(String*);
1480
1480
  }
1481
1481
  int save_in_field(Field *field, bool no_conversions);
1482
1482
  enum Type type() const { return REAL_ITEM; }
1483
 
  enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
 
1483
  enum_field_types field_type() const { return DRIZZLE_TYPE_DOUBLE; }
1484
1484
  double val_real() { assert(fixed == 1); return value; }
1485
1485
  int64_t val_int()
1486
1486
  {
1597
1597
  my_decimal *val_decimal(my_decimal *);
1598
1598
  int save_in_field(Field *field, bool no_conversions);
1599
1599
  enum Item_result result_type () const { return STRING_RESULT; }
1600
 
  enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
 
1600
  enum_field_types field_type() const { return DRIZZLE_TYPE_VARCHAR; }
1601
1601
  bool basic_const_item() const { return 1; }
1602
1602
  bool eq(const Item *item, bool binary_cmp) const;
1603
1603
  Item *clone_item() 
1696
1696
    Item_string(name, length, &my_charset_bin)
1697
1697
  { max_length= length; }
1698
1698
  enum Type type() const { return TYPE_HOLDER; }
1699
 
  enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
 
1699
  enum_field_types field_type() const { return DRIZZLE_TYPE_BLOB; }
1700
1700
};
1701
1701
 
1702
1702
 
1748
1748
  int save_in_field(Field *field, bool no_conversions);
1749
1749
  enum Item_result result_type () const { return STRING_RESULT; }
1750
1750
  enum Item_result cast_to_int_type() const { return INT_RESULT; }
1751
 
  enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
 
1751
  enum_field_types field_type() const { return DRIZZLE_TYPE_VARCHAR; }
1752
1752
  virtual void print(String *str, enum_query_type query_type);
1753
1753
  bool eq(const Item *item, bool binary_cmp) const;
1754
1754
  virtual Item *safe_charset_converter(CHARSET_INFO *tocs);
2288
2288
  enum enum_field_types cached_field_type;
2289
2289
public:
2290
2290
  Item_cache(): 
2291
 
    example(0), used_table_map(0), cached_field(0), cached_field_type(MYSQL_TYPE_STRING) 
 
2291
    example(0), used_table_map(0), cached_field(0), cached_field_type(DRIZZLE_TYPE_STRING) 
2292
2292
  {
2293
2293
    fixed= 1; 
2294
2294
    null_value= 1;
2396
2396
    Item_cache(), value(0),
2397
2397
    is_varbinary(item->type() == FIELD_ITEM &&
2398
2398
                 ((const Item_field *) item)->field->type() ==
2399
 
                   MYSQL_TYPE_VARCHAR &&
 
2399
                   DRIZZLE_TYPE_VARCHAR &&
2400
2400
                 !((const Item_field *) item)->field->has_charset())
2401
2401
  {}
2402
2402
  void store(Item *item);