73
Table() {} /* Remove gcc warning */
76
Field **field; /* Pointer to fields */
82
uint32_t db_stat; /* mode of file as in handler.h */
73
84
my_bitmap_map *bitmap_init_value;
74
85
MY_BITMAP def_read_set, def_write_set, tmp_set; /* containers */
75
86
MY_BITMAP *read_set, *write_set; /* Active column sets */
78
Table() {} /* Remove gcc warning */
81
inline TableShare *getShare() { return s; } /* Get rid of this long term */
82
inline void setShare(TableShare *new_share) { s= new_share; } /* Get rid of this long term */
83
inline uint32_t sizeKeys() { return s->keys; }
84
inline uint32_t sizeFields() { return s->fields; }
85
inline uint32_t getRecordLength() { return s->reclength; }
86
inline uint32_t sizeBlobFields() { return s->blob_fields; }
87
inline uint32_t *getBlobField() { return s->blob_field; }
88
inline uint32_t getNullBytes() { return s->null_bytes; }
89
inline uint32_t getNullFields() { return s->null_fields; }
90
inline unsigned char *getDefaultValues() { return s->default_values; }
92
inline bool isDatabaseLowByteFirst() { return s->db_low_byte_first; } /* Portable row format */
93
inline bool isCrashed() { return s->crashed; }
94
inline bool isNameLock() { return s->name_lock; }
95
inline bool isReplaceWithNameLock() { return s->replace_with_name_lock; }
96
inline bool isWaitingOnCondition() { return s->waiting_on_cond; } /* Protection against free */
98
/* For TMP tables, should be pulled out as a class */
99
void updateCreateInfo(HA_CREATE_INFO *create_info);
100
void setup_tmp_table_column_bitmaps(unsigned char *bitmaps);
101
bool create_myisam_tmp_table(KEY *keyinfo,
102
MI_COLUMNDEF *start_recinfo,
103
MI_COLUMNDEF **recinfo,
105
void free_tmp_table(Session *session);
106
bool open_tmp_table();
107
size_t max_row_length(const unsigned char *data);
108
uint32_t find_shortest_key(const key_map *usable_keys);
109
bool compare_record(Field **ptr);
110
bool compare_record();
111
/* TODO: the (re)storeRecord's may be able to be further condensed */
113
void storeRecordAsInsert();
114
void storeRecordAsDefault();
115
void restoreRecord();
116
void restoreRecordAsDefault();
118
bool table_check_intact(const uint32_t table_f_count, const TABLE_FIELD_W_TYPE *table_def);
120
/* See if this can be blown away */
121
inline uint32_t getDBStat () { return db_stat; }
122
inline uint32_t setDBStat () { return db_stat; }
123
uint32_t db_stat; /* mode of file as in handler.h */
128
88
Session *in_use; /* Which thread uses this */
129
Field **field; /* Pointer to fields */
131
90
unsigned char *record[2]; /* Pointer to records */
132
91
unsigned char *write_row_record; /* Used as optimisation in
284
243
MEM_ROOT mem_root;
285
244
filesort_info_st sort;
247
inline TableShare *getShare() { return s; } /* Get rid of this long term */
248
inline void setShare(TableShare *new_share) { s= new_share; } /* Get rid of this long term */
249
inline uint32_t sizeKeys() { return s->keys; }
250
inline uint32_t sizeFields() { return s->fields; }
251
inline uint32_t getRecordLength() { return s->reclength; }
252
inline uint32_t sizeBlobFields() { return s->blob_fields; }
253
inline uint32_t *getBlobField() { return s->blob_field; }
254
inline uint32_t getNullBytes() { return s->null_bytes; }
255
inline uint32_t getNullFields() { return s->null_fields; }
256
inline unsigned char *getDefaultValues() { return s->default_values; }
258
inline bool isDatabaseLowByteFirst() { return s->db_low_byte_first; } /* Portable row format */
259
inline bool isCrashed() { return s->crashed; }
260
inline bool isNameLock() { return s->name_lock; }
261
inline bool isReplaceWithNameLock() { return s->replace_with_name_lock; }
262
inline bool isWaitingOnCondition() { return s->waiting_on_cond; } /* Protection against free */
264
/* For TMP tables, should be pulled out as a class */
265
void updateCreateInfo(HA_CREATE_INFO *create_info);
266
void setup_tmp_table_column_bitmaps(unsigned char *bitmaps);
267
bool create_myisam_tmp_table(KEY *keyinfo,
268
MI_COLUMNDEF *start_recinfo,
269
MI_COLUMNDEF **recinfo,
271
void free_tmp_table(Session *session);
272
bool open_tmp_table();
273
size_t max_row_length(const unsigned char *data);
274
uint32_t find_shortest_key(const key_map *usable_keys);
275
bool compare_record(Field **ptr);
276
bool compare_record();
277
/* TODO: the (re)storeRecord's may be able to be further condensed */
279
void storeRecordAsInsert();
280
void storeRecordAsDefault();
281
void restoreRecord();
282
void restoreRecordAsDefault();
284
bool table_check_intact(const uint32_t table_f_count, const TABLE_FIELD_W_TYPE *table_def);
286
/* See if this can be blown away */
287
inline uint32_t getDBStat () { return db_stat; }
288
inline uint32_t setDBStat () { return db_stat; }
287
289
bool fill_item_list(List<Item> *item_list) const;
288
290
void reset_item_list(List<Item> *item_list) const;
289
291
void clear_column_bitmaps(void);