~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/structs.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
/* The old structures from unireg */
22
22
 
23
 
#include <mysys/iocache.h>
24
 
 
25
23
class Table;
26
24
class Field;
27
25
 
51
49
  time_t create_time;                   /* When table was created */
52
50
  time_t check_time;
53
51
  time_t update_time;
54
 
  uint64_t mean_rec_length;             /* physical reclength */
 
52
  ulong mean_rec_length;                /* physical reclength */
55
53
} KEYFILE_INFO;
56
54
 
57
55
 
111
109
 
112
110
struct st_read_record;                          /* For referense later */
113
111
class SQL_SELECT;
114
 
class Session;
 
112
class THD;
115
113
class handler;
116
114
struct st_join_table;
117
115
 
120
118
  handler *file;
121
119
  Table **forms;                        /* head and ref forms */
122
120
  int (*read_record)(struct st_read_record *);
123
 
  Session *session;
 
121
  THD *thd;
124
122
  SQL_SELECT *select;
125
123
  uint32_t cache_records;
126
124
  uint32_t ref_length,struct_length,reclength,rec_cache_size,error_offset;
136
134
 
137
135
 
138
136
typedef struct {
139
 
  uint32_t year;
140
 
  uint32_t month;
141
 
  uint32_t day;
142
 
  uint32_t hour;
 
137
  ulong year,month,day,hour;
143
138
  uint64_t minute,second,second_part;
144
139
  bool neg;
145
140
} INTERVAL;
156
151
 
157
152
extern const char *show_comp_option_name[];
158
153
 
159
 
typedef int *(*update_var)(Session *, struct st_mysql_show_var *);
 
154
typedef int *(*update_var)(THD *, struct st_mysql_show_var *);
160
155
 
161
156
typedef struct  st_lex_user {
162
157
  LEX_STRING user, host, password;
248
243
  { auto_inc_interval_min + k * increment,
249
244
    0 <= k <= (auto_inc_interval_values-1) }
250
245
  Where "increment" is maintained separately by the user of this class (and is
251
 
  currently only session->variables.auto_increment_increment).
 
246
  currently only thd->variables.auto_increment_increment).
252
247
  It mustn't derive from Sql_alloc, because SET INSERT_ID needs to
253
248
  allocate memory which must stay allocated for use by the next statement.
254
249
*/
266
261
    interval_max=    (val == UINT64_MAX) ? val : start + val * incr;
267
262
  }
268
263
  Discrete_interval(uint64_t start, uint64_t val, uint64_t incr) :
269
 
    interval_min(start), interval_values(val),
270
 
    interval_max((val == UINT64_MAX) ? val : start + val * incr),
271
 
    next(NULL)
272
 
  {};
273
 
  Discrete_interval() :
274
 
    interval_min(0), interval_values(0),
275
 
    interval_max(0), next(NULL)
276
 
  {};
 
264
    next(NULL) { replace(start, val, incr); };
 
265
  Discrete_interval() : next(NULL) { replace(0, 0, 0); };
277
266
  uint64_t minimum() const { return interval_min;    };
278
267
  uint64_t values()  const { return interval_values; };
279
268
  uint64_t maximum() const { return interval_max;    };
325
314
    }
326
315
  }
327
316
public:
328
 
  Discrete_intervals_list() :
329
 
    head(NULL), tail(NULL),
330
 
    current(NULL), elements(0) {};
331
 
  Discrete_intervals_list(const Discrete_intervals_list& from) :
332
 
    head(NULL), tail(NULL),
333
 
    current(NULL), elements(0)
 
317
  Discrete_intervals_list() : head(NULL), current(NULL), elements(0) {};
 
318
  Discrete_intervals_list(const Discrete_intervals_list& from)
334
319
  {
335
320
    copy_(from);
336
321
  }
337
 
  Discrete_intervals_list& operator=(const Discrete_intervals_list& from)
 
322
  void operator=(const Discrete_intervals_list& from)
338
323
  {
339
324
    empty();
340
325
    copy_(from);
341
 
    return *this;
342
326
  }
343
327
  void empty_no_free()
344
328
  {