~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.h

  • Committer: Brian Aker
  • Date: 2010-08-18 16:12:58 UTC
  • mto: This revision was merged to the branch mainline in revision 1720.
  • Revision ID: brian@tangent.org-20100818161258-1vm71da888dfvwsx
Remove the code surrounding stack trace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#define DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE FLOATING_POINT_BUFFER
45
45
 
46
46
#ifdef DEBUG
47
 
#define ASSERT_COLUMN_MARKED_FOR_READ assert(!table || (table->read_set == NULL || isReadSet()))
48
 
#define ASSERT_COLUMN_MARKED_FOR_WRITE assert(!table || (table->write_set == NULL || isWriteSet()))
 
47
#define ASSERT_COLUMN_MARKED_FOR_READ assert(!getTable() || (getTable()->read_set == NULL || isReadSet()))
 
48
#define ASSERT_COLUMN_MARKED_FOR_WRITE assert(!getTable() || (getTable()->write_set == NULL || isWriteSet()))
49
49
#else
50
50
#define ASSERT_COLUMN_MARKED_FOR_READ
51
51
#define ASSERT_COLUMN_MARKED_FOR_WRITE
59
59
class CreateField;
60
60
class TableShare;
61
61
class Field;
62
 
struct st_cache_field;
 
62
struct CacheField;
63
63
 
64
64
int field_conv(Field *to,Field *from);
65
65
 
96
96
   * @note You can use table->in_use as replacement for current_session member
97
97
   * only inside of val_*() and store() members (e.g. you can't use it in cons)
98
98
   */
 
99
private:
99
100
  Table *table;
 
101
public:
 
102
  Table *getTable()
 
103
  {
 
104
    assert(table);
 
105
    return table;
 
106
  }
 
107
 
 
108
  Table *getTable() const
 
109
  {
 
110
    assert(table);
 
111
    return table;
 
112
  }
 
113
 
 
114
  void setTable(Table *table_arg)
 
115
  {
 
116
    table= table_arg;
 
117
  }
 
118
 
100
119
  Table *orig_table; /**< Pointer to the original Table. @TODO What is "the original table"? */
101
 
  const char **table_name; /**< Pointer to the name of the table. @TODO This is redundant with Table::table_name. */
102
120
  const char *field_name; /**< Name of the field */
103
121
  LEX_STRING comment; /**< A comment about the field */
104
122
 
536
554
    return max_length;
537
555
  }
538
556
 
539
 
  inline uint32_t offset(unsigned char *record)
 
557
  inline uint32_t offset(const unsigned char *record)
540
558
  {
541
559
    return (uint32_t) (ptr - record);
542
560
  }
543
561
  void copy_from_tmp(int offset);
544
 
  uint32_t fill_cache_field(struct st_cache_field *copy);
 
562
  uint32_t fill_cache_field(CacheField *copy);
545
563
  virtual bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
546
564
  virtual bool get_time(DRIZZLE_TIME *ltime);
547
565
  virtual const CHARSET_INFO *charset(void) const { return &my_charset_bin; }
771
789
  void (*do_copy2)(CopyField *);                // Used to handle null values
772
790
};
773
791
 
774
 
Field *make_field(TableShare *share,
775
 
                  memory::Root *root,
776
 
                  unsigned char *ptr,
777
 
                  uint32_t field_length,
778
 
                  bool is_nullable,
779
 
                  unsigned char *null_pos,
780
 
                  unsigned char null_bit,
781
 
                  uint8_t decimals,
782
 
                  enum_field_types field_type,
783
 
                  const CHARSET_INFO * cs,
784
 
                  Field::utype unireg_check,
785
 
                  TYPELIB *interval,
786
 
                  const char *field_name);
787
 
 
788
792
uint32_t pack_length_to_packflag(uint32_t type);
789
793
uint32_t calc_pack_length(enum_field_types type,uint32_t length);
790
794
int set_field_to_null(Field *field);