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 */
142
142
ulong year,month,day,hour;
143
ulonglong minute,second,second_part;
143
uint64_t minute,second,second_part;
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).
210
ulonglong reset_utime;
210
uint64_t reset_utime;
211
211
/* Total length of the key. */
213
213
/* Current amount of concurrent connections for this account. */
255
255
class Discrete_interval {
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.
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)
264
264
interval_min= start;
265
265
interval_values= val;
266
266
interval_max= (val == ULONGLONG_MAX) ? val : start + val * incr;
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; };
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.
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)
281
281
if (interval_max == start)
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; }