23 #include "myisam_priv.h"
26 using namespace drizzled;
33 THR_LOCK_myisam.lock();
34 if (info->lock_type == F_EXTRA_LCK)
35 info->lock_type=F_UNLCK;
37 if (share->reopen == 1 && share->kfile >= 0)
38 _mi_decrement_open_count(info);
40 if (info->lock_type != F_UNLCK)
42 if (mi_lock_database(info,F_UNLCK))
46 if (share->options & HA_OPTION_READ_ONLY_DATA)
51 if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
55 info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
57 flag= !--share->reopen;
58 myisam_open_list.remove(info);
60 void * rec_buff_ptr= mi_get_rec_buff_ptr(info, info->rec_buff);
64 if (share->kfile >= 0)
72 if (share->mode != O_RDONLY && mi_is_crashed(info))
73 mi_state_info_write(share->kfile, &share->state, 1);
74 if (internal::my_close(share->kfile,MYF(0)))
77 if (share->decode_trees)
79 free((
unsigned char*) share->decode_trees);
80 free((
unsigned char*) share->decode_tables);
82 delete info->s->in_use;
83 free((
unsigned char*) info->s);
85 THR_LOCK_myisam.unlock();
87 if (info->dfile >= 0 && internal::my_close(info->dfile,MYF(0)))
90 free((
unsigned char*) info);
int end_io_cache()
Free an io_cache_st object.