~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_open.c

  • 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:
62
62
  have an open count of 0.
63
63
******************************************************************************/
64
64
 
65
 
MI_INFO *mi_open(const char *name, int mode, uint open_flags)
 
65
MI_INFO *mi_open(const char *name, int mode, uint32_t open_flags)
66
66
{
67
67
  int lock_error,kfile,open_mode,save_errno,have_rtree=0;
68
 
  uint i,j,len,errpos,head_length,base_pos,offset,info_length,keys,
 
68
  uint32_t i,j,len,errpos,head_length,base_pos,offset,info_length,keys,
69
69
    key_parts,unique_key_parts,fulltext_keys,uniques;
70
70
  char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN],
71
71
       data_name[FN_REFLEN];
548
548
 
549
549
unsigned char *mi_alloc_rec_buff(MI_INFO *info, ulong length, unsigned char **buf)
550
550
{
551
 
  uint extra;
 
551
  uint32_t extra;
552
552
  uint32_t old_length= 0;
553
553
 
554
554
  if (! *buf || length > (old_length=mi_get_rec_buff_len(info, *buf)))
694
694
   Function to save and store the header in the index file (.MYI)
695
695
*/
696
696
 
697
 
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
 
697
uint32_t mi_state_info_write(File file, MI_STATE_INFO *state, uint32_t pWrite)
698
698
{
699
699
  unsigned char  buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
700
700
  unsigned char *ptr=buff;
734
734
  }
735
735
  if (pWrite & 2)                               /* From isamchk */
736
736
  {
737
 
    uint key_parts= mi_uint2korr(state->header.key_parts);
 
737
    uint32_t key_parts= mi_uint2korr(state->header.key_parts);
738
738
    mi_int4store(ptr,state->sec_index_changed); ptr +=4;
739
739
    mi_int4store(ptr,state->sec_index_used);    ptr +=4;
740
740
    mi_int4store(ptr,state->version);           ptr +=4;
759
759
 
760
760
unsigned char *mi_state_info_read(unsigned char *ptr, MI_STATE_INFO *state)
761
761
{
762
 
  uint i,keys,key_parts,key_blocks;
 
762
  uint32_t i,keys,key_parts,key_blocks;
763
763
  memcpy(&state->header,ptr, sizeof(state->header));
764
764
  ptr +=sizeof(state->header);
765
765
  keys=(uint) state->header.keys;
810
810
}
811
811
 
812
812
 
813
 
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, bool pRead)
 
813
uint32_t mi_state_info_read_dsk(File file, MI_STATE_INFO *state, bool pRead)
814
814
{
815
815
  unsigned char buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
816
816
 
833
833
**  store and read of MI_BASE_INFO
834
834
****************************************************************************/
835
835
 
836
 
uint mi_base_info_write(File file, MI_BASE_INFO *base)
 
836
uint32_t mi_base_info_write(File file, MI_BASE_INFO *base)
837
837
{
838
838
  unsigned char buff[MI_BASE_INFO_SIZE], *ptr=buff;
839
839
 
912
912
  mi_keydef
913
913
---------------------------------------------------------------------------*/
914
914
 
915
 
uint mi_keydef_write(File file, MI_KEYDEF *keydef)
 
915
uint32_t mi_keydef_write(File file, MI_KEYDEF *keydef)
916
916
{
917
917
  unsigned char buff[MI_KEYDEF_SIZE];
918
918
  unsigned char *ptr=buff;
997
997
  mi_uniquedef
998
998
---------------------------------------------------------------------------*/
999
999
 
1000
 
uint mi_uniquedef_write(File file, MI_UNIQUEDEF *def)
 
1000
uint32_t mi_uniquedef_write(File file, MI_UNIQUEDEF *def)
1001
1001
{
1002
1002
  unsigned char buff[MI_UNIQUEDEF_SIZE];
1003
1003
  unsigned char *ptr=buff;
1021
1021
**  MI_COLUMNDEF
1022
1022
***************************************************************************/
1023
1023
 
1024
 
uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo)
 
1024
uint32_t mi_recinfo_write(File file, MI_COLUMNDEF *recinfo)
1025
1025
{
1026
1026
  unsigned char buff[MI_COLUMNDEF_SIZE];
1027
1027
  unsigned char *ptr=buff;