~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.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:
208
208
  enum ha_choice transactional;
209
209
  enum ha_choice page_checksum;
210
210
 
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 */
230
 
  uint primary_key;
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 */
266
266
      appropriate values by using table cache key as their source.
267
267
  */
268
268
 
269
 
  void set_table_cache_key(char *key_buff, uint key_length)
 
269
  void set_table_cache_key(char *key_buff, uint32_t key_length)
270
270
  {
271
271
    table_cache_key.str= key_buff;
272
272
    table_cache_key.length= key_length;
296
296
      it should has same life-time as share itself.
297
297
  */
298
298
 
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)
300
300
  {
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; }
357
357
 
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();
378
378
 
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);
380
380
 
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 */
385
385
 
386
386
  handler       *file;
485
485
  timestamp_auto_set_type timestamp_field_type;
486
486
  table_map     map;                    /* ID bit of table (1,2,4,8,16...) */
487
487
 
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 */
498
498
 
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);
660
660
     For string-type columns, this is the maximum number of
661
661
     characters. Otherwise, it is the 'display-length' for the column.
662
662
  */
663
 
  uint field_length;
 
663
  uint32_t field_length;
664
664
  /**
665
665
     This denotes data type for the column. For the most part, there seems to
666
666
     be one entry in the enum for each SQL data type, although there seem to
676
676
     combine them using the bitwise or operator @c |. Both flags are
677
677
     defined in table.h.
678
678
   */
679
 
  uint field_flags;        // Field atributes(maybe_null, signed, unsigned etc.)
 
679
  uint32_t field_flags;        // Field atributes(maybe_null, signed, unsigned etc.)
680
680
  const char* old_name;
681
681
  /**
682
682
     This should be one of @c SKIP_OPEN_TABLE,
683
683
     @c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE.
684
684
  */
685
 
  uint open_method;
 
685
  uint32_t open_method;
686
686
} ST_FIELD_INFO;
687
687
 
688
688
 
703
703
                        bool res, LEX_STRING *db_name, LEX_STRING *table_name);
704
704
  int idx_field1, idx_field2; 
705
705
  bool hidden;
706
 
  uint i_s_requested_object;  /* the object we need to open(Table | VIEW) */
 
706
  uint32_t i_s_requested_object;  /* the object we need to open(Table | VIEW) */
707
707
};
708
708
 
709
709