~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/structs.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:
35
35
  File filenr;                          /* (uniq) filenr for table */
36
36
  ha_rows records;                      /* Records i datafilen */
37
37
  ha_rows deleted;                      /* Deleted records */
38
 
  ulonglong data_file_length;           /* Length off data file */
39
 
  ulonglong max_data_file_length;       /* Length off data file */
40
 
  ulonglong index_file_length;
41
 
  ulonglong max_index_file_length;
42
 
  ulonglong delete_length;              /* Free bytes */
43
 
  ulonglong auto_increment_value;
 
38
  uint64_t data_file_length;            /* Length off data file */
 
39
  uint64_t max_data_file_length;        /* Length off data file */
 
40
  uint64_t index_file_length;
 
41
  uint64_t max_index_file_length;
 
42
  uint64_t delete_length;               /* Free bytes */
 
43
  uint64_t auto_increment_value;
44
44
  int errkey,sortkey;                   /* Last errorkey and sorted by */
45
45
  time_t create_time;                   /* When table was created */
46
46
  time_t check_time;
140
140
 
141
141
typedef struct {
142
142
  ulong year,month,day,hour;
143
 
  ulonglong minute,second,second_part;
 
143
  uint64_t minute,second,second_part;
144
144
  bool neg;
145
145
} INTERVAL;
146
146
 
207
207
     The moment of time when per hour counters were reset last time
208
208
     (i.e. start of "hour" for conn_per_hour, updates, questions counters).
209
209
  */
210
 
  ulonglong reset_utime;
 
210
  uint64_t reset_utime;
211
211
  /* Total length of the key. */
212
212
  uint len;
213
213
  /* Current amount of concurrent connections for this account. */
254
254
*/
255
255
class Discrete_interval {
256
256
private:
257
 
  ulonglong interval_min;
258
 
  ulonglong interval_values;
259
 
  ulonglong  interval_max;    // excluded bound. Redundant.
 
257
  uint64_t interval_min;
 
258
  uint64_t interval_values;
 
259
  uint64_t  interval_max;    // excluded bound. Redundant.
260
260
public:
261
261
  Discrete_interval *next;    // used when linked into Discrete_intervals_list
262
 
  void replace(ulonglong start, ulonglong val, ulonglong incr)
 
262
  void replace(uint64_t start, uint64_t val, uint64_t incr)
263
263
  {
264
264
    interval_min=    start;
265
265
    interval_values= val;
266
266
    interval_max=    (val == ULONGLONG_MAX) ? val : start + val * incr;
267
267
  }
268
 
  Discrete_interval(ulonglong start, ulonglong val, ulonglong incr) :
 
268
  Discrete_interval(uint64_t start, uint64_t val, uint64_t incr) :
269
269
    next(NULL) { replace(start, val, incr); };
270
270
  Discrete_interval() : next(NULL) { replace(0, 0, 0); };
271
 
  ulonglong minimum() const { return interval_min;    };
272
 
  ulonglong values()  const { return interval_values; };
273
 
  ulonglong maximum() const { return interval_max;    };
 
271
  uint64_t minimum() const { return interval_min;    };
 
272
  uint64_t values()  const { return interval_values; };
 
273
  uint64_t maximum() const { return interval_max;    };
274
274
  /*
275
275
    If appending [3,5] to [1,2], we merge both in [1,5] (they should have the
276
276
    same increment for that, user of the class has to ensure that). That is
277
277
    just a space optimization. Returns 0 if merge succeeded.
278
278
  */
279
 
  bool merge_if_contiguous(ulonglong start, ulonglong val, ulonglong incr)
 
279
  bool merge_if_contiguous(uint64_t start, uint64_t val, uint64_t incr)
280
280
  {
281
281
    if (interval_max == start)
282
282
    {
353
353
    return tmp;
354
354
  }
355
355
  ~Discrete_intervals_list() { empty(); };
356
 
  bool append(ulonglong start, ulonglong val, ulonglong incr);
 
356
  bool append(uint64_t start, uint64_t val, uint64_t incr);
357
357
  bool append(Discrete_interval *interval);
358
 
  ulonglong minimum()     const { return (head ? head->minimum() : 0); };
359
 
  ulonglong maximum()     const { return (head ? tail->maximum() : 0); };
 
358
  uint64_t minimum()     const { return (head ? head->minimum() : 0); };
 
359
  uint64_t maximum()     const { return (head ? tail->maximum() : 0); };
360
360
  uint      nb_elements() const { return elements; }
361
361
};