208
208
enum ha_choice transactional;
209
209
enum ha_choice page_checksum;
211
uint ref_count; /* How many Table objects uses this */
212
uint open_count; /* Number of tables in open list */
213
uint blob_ptr_size; /* 4 or 8 */
214
uint key_block_size; /* create key_block_size, if used */
215
uint null_bytes, last_null_bit_pos;
216
uint fields; /* Number of fields */
217
uint rec_buff_length; /* Size of table->record[] buffer */
218
uint keys, key_parts;
219
uint max_key_length, max_unique_length, total_key_length;
220
uint uniques; /* Number of UNIQUE index */
221
uint null_fields; /* number of null fields */
222
uint blob_fields; /* number of blob fields */
223
uint timestamp_field_offset; /* Field number for timestamp field */
224
uint varchar_fields; /* number of varchar fields */
225
uint db_create_options; /* Create options from database */
226
uint db_options_in_use; /* Options in use */
227
uint db_record_offset; /* if HA_REC_IN_SEQ */
228
uint rowid_field_offset; /* Field_nr +1 to rowid field */
211
uint32_t ref_count; /* How many Table objects uses this */
212
uint32_t open_count; /* Number of tables in open list */
213
uint32_t blob_ptr_size; /* 4 or 8 */
214
uint32_t key_block_size; /* create key_block_size, if used */
215
uint32_t null_bytes, last_null_bit_pos;
216
uint32_t fields; /* Number of fields */
217
uint32_t rec_buff_length; /* Size of table->record[] buffer */
218
uint32_t keys, key_parts;
219
uint32_t max_key_length, max_unique_length, total_key_length;
220
uint32_t uniques; /* Number of UNIQUE index */
221
uint32_t null_fields; /* number of null fields */
222
uint32_t blob_fields; /* number of blob fields */
223
uint32_t timestamp_field_offset; /* Field number for timestamp field */
224
uint32_t varchar_fields; /* number of varchar fields */
225
uint32_t db_create_options; /* Create options from database */
226
uint32_t db_options_in_use; /* Options in use */
227
uint32_t db_record_offset; /* if HA_REC_IN_SEQ */
228
uint32_t rowid_field_offset; /* Field_nr +1 to rowid field */
229
229
/* Index of auto-updated TIMESTAMP field in field array */
231
uint next_number_index; /* autoincrement key number */
232
uint next_number_key_offset; /* autoinc keypart offset in a key */
233
uint next_number_keypart; /* autoinc keypart number in a key */
234
uint error, open_errno, errarg; /* error from open_table_def() */
235
uint column_bitmap_size;
230
uint32_t primary_key;
231
uint32_t next_number_index; /* autoincrement key number */
232
uint32_t next_number_key_offset; /* autoinc keypart offset in a key */
233
uint32_t next_number_keypart; /* autoinc keypart number in a key */
234
uint32_t error, open_errno, errarg; /* error from open_table_def() */
235
uint32_t column_bitmap_size;
236
236
unsigned char frm_version;
237
237
bool null_field_first;
238
238
bool db_low_byte_first; /* Portable row format */
296
296
it should has same life-time as share itself.
299
void set_table_cache_key(char *key_buff, const char *key, uint key_length)
299
void set_table_cache_key(char *key_buff, const char *key, uint32_t key_length)
301
301
memcpy(key_buff, key, key_length);
302
302
set_table_cache_key(key_buff, key_length);
346
346
/* SHARE methods */
347
347
inline TABLE_SHARE *getShare() { return s; } /* Get rid of this long term */
348
348
inline void setShare(TABLE_SHARE *new_share) { s= new_share; } /* Get rid of this long term */
349
inline uint sizeKeys() { return s->keys; }
350
inline uint sizeFields() { return s->fields; }
351
inline uint getRecordLength() { return s->reclength; }
352
inline uint sizeBlobFields() { return s->blob_fields; }
353
inline uint *getBlobField() { return s->blob_field; }
354
inline uint getNullBytes() { return s->null_bytes; }
355
inline uint getNullFields() { return s->null_fields; }
349
inline uint32_t sizeKeys() { return s->keys; }
350
inline uint32_t sizeFields() { return s->fields; }
351
inline uint32_t getRecordLength() { return s->reclength; }
352
inline uint32_t sizeBlobFields() { return s->blob_fields; }
353
inline uint32_t *getBlobField() { return s->blob_field; }
354
inline uint32_t getNullBytes() { return s->null_bytes; }
355
inline uint32_t getNullFields() { return s->null_fields; }
356
356
inline unsigned char *getDefaultValues() { return s->default_values; }
358
358
inline bool isNullFieldFirst() { return s->null_field_first; }
372
372
void free_tmp_table(THD *thd);
373
373
bool open_tmp_table();
374
374
size_t max_row_length(const unsigned char *data);
375
uint find_shortest_key(const key_map *usable_keys);
375
uint32_t find_shortest_key(const key_map *usable_keys);
376
376
bool compare_record(Field **ptr);
377
377
bool compare_record();
379
bool table_check_intact(const uint table_f_count, const TABLE_FIELD_W_TYPE *table_def);
379
bool table_check_intact(const uint32_t table_f_count, const TABLE_FIELD_W_TYPE *table_def);
381
381
/* See if this can be blown away */
382
inline uint getDBStat () { return db_stat; }
383
inline uint setDBStat () { return db_stat; }
382
inline uint32_t getDBStat () { return db_stat; }
383
inline uint32_t setDBStat () { return db_stat; }
384
384
uint db_stat; /* mode of file as in handler.h */
485
485
timestamp_auto_set_type timestamp_field_type;
486
486
table_map map; /* ID bit of table (1,2,4,8,16...) */
488
uint lock_position; /* Position in DRIZZLE_LOCK.table */
489
uint lock_data_start; /* Start pos. in DRIZZLE_LOCK.locks */
490
uint lock_count; /* Number of locks */
488
uint32_t lock_position; /* Position in DRIZZLE_LOCK.table */
489
uint32_t lock_data_start; /* Start pos. in DRIZZLE_LOCK.locks */
490
uint32_t lock_count; /* Number of locks */
491
491
uint tablenr,used_fields;
492
uint temp_pool_slot; /* Used by intern temp tables */
492
uint32_t temp_pool_slot; /* Used by intern temp tables */
493
493
uint status; /* What's in record[0] */
494
494
/* number of select if it is derived table */
495
uint derived_select_number;
495
uint32_t derived_select_number;
496
496
int current_lock; /* Type of lock on table */
497
497
bool copy_blobs; /* copy_blobs when storing */
554
554
void reset_item_list(List<Item> *item_list) const;
555
555
void clear_column_bitmaps(void);
556
556
void prepare_for_position(void);
557
void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map);
558
void mark_columns_used_by_index(uint index);
557
void mark_columns_used_by_index_no_reset(uint32_t index, MY_BITMAP *map);
558
void mark_columns_used_by_index(uint32_t index);
559
559
void restore_column_maps_after_mark_index();
560
560
void mark_auto_increment_column(void);
561
561
void mark_columns_needed_for_update(void);