~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/structs.h

  • Committer: Monty Taylor
  • Date: 2010-03-23 08:23:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1398.
  • Revision ID: mordred@inaugust.com-20100323082332-r8tktlbu82wlamzv
Set the default plugin version for plugins not specifying a version to be
tied to the actual server version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
class Table;
40
40
class Field;
41
41
 
42
 
class KeyPartInfo 
43
 
{       /* Info about a key part */
44
 
public:
 
42
typedef struct st_keyfile_info {        /* used with ha_info() */
 
43
  unsigned char ref[MAX_REFLENGTH];             /* Pointer to current row */
 
44
  unsigned char dupp_ref[MAX_REFLENGTH];        /* Pointer to dupp row */
 
45
  uint32_t ref_length;                  /* Length of ref (1-8) */
 
46
  uint32_t block_size;                  /* index block size */
 
47
  int filenr;                           /* (uniq) filenr for table */
 
48
  ha_rows records;                      /* Records i datafilen */
 
49
  ha_rows deleted;                      /* Deleted records */
 
50
  uint64_t data_file_length;            /* Length off data file */
 
51
  uint64_t max_data_file_length;        /* Length off data file */
 
52
  uint64_t index_file_length;
 
53
  uint64_t max_index_file_length;
 
54
  uint64_t delete_length;               /* Free bytes */
 
55
  uint64_t auto_increment_value;
 
56
  int errkey,sortkey;                   /* Last errorkey and sorted by */
 
57
  time_t create_time;                   /* When table was created */
 
58
  time_t check_time;
 
59
  time_t update_time;
 
60
  uint64_t mean_rec_length;             /* physical reclength */
 
61
} KEYFILE_INFO;
 
62
 
 
63
 
 
64
typedef struct st_key_part_info {       /* Info about a key part */
45
65
  Field *field;
46
66
  unsigned int  offset;                         /* offset in record (from 0) */
47
67
  unsigned int  null_offset;                    /* Offset to null_bit in record */
57
77
  */
58
78
  uint16_t store_length;
59
79
  uint16_t key_type;
60
 
private:
61
 
public:
62
 
  uint16_t getKeyType() const
63
 
  {
64
 
    return key_type;
65
 
  }
66
80
  uint16_t fieldnr;                     /* Fieldnum in UNIREG (1,2,3,...) */
67
81
  uint16_t key_part_flag;                       /* 0 or HA_REVERSE_SORT */
68
82
  uint8_t type;
69
83
  uint8_t null_bit;                     /* Position to null_bit */
70
 
};
71
 
 
72
 
 
73
 
class KeyInfo 
74
 
{
75
 
public:
 
84
} KEY_PART_INFO ;
 
85
 
 
86
 
 
87
typedef struct st_key {
76
88
  unsigned int  key_length;             /* Tot length of key */
77
89
  enum  ha_key_alg algorithm;
78
90
  unsigned long flags;                  /* dupp key and pack flags */
80
92
  uint32_t  extra_length;
81
93
  unsigned int usable_key_parts;        /* Should normally be = key_parts */
82
94
  uint32_t  block_size;
83
 
  KeyPartInfo *key_part;
 
95
  KEY_PART_INFO *key_part;
84
96
  char  *name;                          /* Name of key */
85
97
  /*
86
98
    Array of AVG(#records with the same field value) for 1st ... Nth key part.
90
102
  ulong *rec_per_key;
91
103
  Table *table;
92
104
  LEX_STRING comment;
93
 
};
 
105
} KEY;
94
106
 
95
107
 
96
108
class JoinTable;
97
109
 
98
 
class RegInfo 
99
 
{
100
 
public:         /* Extra info about reg */
 
110
struct RegInfo {                /* Extra info about reg */
101
111
  JoinTable *join_tab;  /* Used by SELECT() */
102
112
  enum thr_lock_type lock_type;         /* How database is used */
103
113
  bool not_exists_optimize;
114
124
  }
115
125
};
116
126
 
 
127
struct st_read_record;                          /* For referense later */
117
128
class Session;
118
129
class Cursor;
119
130
namespace optimizer { class SqlSelect; }
120
131
 
 
132
typedef struct st_read_record {                 /* Parameter to read_record */
 
133
  Table *table;                 /* Head-form */
 
134
  Cursor *cursor;
 
135
  Table **forms;                        /* head and ref forms */
 
136
  int (*read_record)(struct st_read_record *);
 
137
  Session *session;
 
138
  optimizer::SqlSelect *select;
 
139
  uint32_t cache_records;
 
140
  uint32_t ref_length,struct_length,reclength,rec_cache_size,error_offset;
 
141
  uint32_t index;
 
142
  unsigned char *ref_pos;                               /* pointer to form->refpos */
 
143
  unsigned char *record;
 
144
  unsigned char *rec_buf;                /* to read field values  after filesort */
 
145
  unsigned char *cache,*cache_pos,*cache_end,*read_positions;
 
146
  internal::IO_CACHE *io_cache;
 
147
  bool print_error, ignore_not_found_rows;
 
148
  JoinTable *do_insideout_scan;
 
149
} READ_RECORD;
 
150
 
121
151
typedef int *(*update_var)(Session *, struct drizzle_show_var *);
122
152
 
123
153
} /* namespace drizzled */