~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/myisam_priv.h

Merged in move of status variables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* This file is included by all internal myisam files */
17
17
 
31
31
#include <string.h>
32
32
#include <list>
33
33
 
34
 
#include <boost/thread/mutex.hpp>
35
 
 
36
34
#if defined(my_write)
37
35
#undef my_write                         /* undef map from my_nosys; We need test-if-disk full */
38
36
#endif
39
37
 
40
 
/* Typical key cash */
41
 
static const uint32_t KEY_CACHE_SIZE= 8*1024*1024;
42
 
 
43
 
/* Default size of a key cache block  */
44
 
static const uint32_t KEY_CACHE_BLOCK_SIZE= 1024;
45
 
 
46
38
typedef struct st_mi_status_info
47
39
{
48
40
  drizzled::ha_rows records;                    /* Rows in table */
185
177
  char  *data_file_name,                /* Resolved path names from symlinks */
186
178
        *index_file_name;
187
179
  unsigned char *file_map;                      /* mem-map of file if possible */
188
 
private:
189
 
  drizzled::KEY_CACHE key_cache;                        /* ref to the current key cache */
190
 
public:
191
 
  drizzled::KEY_CACHE *getKeyCache()
192
 
  {
193
 
    return &key_cache;
194
 
  }
195
 
 
196
 
  void setKeyCache();
197
 
 
 
180
  drizzled::KEY_CACHE *key_cache;                       /* ref to the current key cache */
198
181
  MI_DECODE_TREE *decode_trees;
199
182
  uint16_t *decode_tables;
200
183
  int (*read_record)(struct st_myisam_info*, drizzled::internal::my_off_t, unsigned char*);
212
195
  ulong this_process;                   /* processid */
213
196
  ulong last_process;                   /* For table-change-check */
214
197
  ulong last_version;                   /* Version on start */
215
 
  uint64_t options;                     /* Options used */
 
198
  ulong options;                        /* Options used */
216
199
  ulong min_pack_length;                /* Theese are used by packed data */
217
200
  ulong max_pack_length;
218
201
  ulong state_diff_length;
234
217
    not_flushed,
235
218
    temporary,delay_key_write,
236
219
    concurrent_insert;
 
220
  drizzled::THR_LOCK lock;
 
221
  pthread_mutex_t intern_lock;          /* Locking for use with _locking */
 
222
  pthread_rwlock_t *key_root_lock;
237
223
  drizzled::internal::my_off_t mmaped_length;
238
224
  uint32_t     nonmmaped_inserts;           /* counter of writing in non-mmaped
239
225
                                           area */
 
226
  pthread_rwlock_t mmap_lock;
240
227
} MYISAM_SHARE;
241
228
 
242
229
 
472
459
#define MI_UNIQUE_HASH_TYPE     HA_KEYTYPE_ULONG_INT
473
460
#define mi_unique_store(A,B)    mi_int4store((A),(B))
474
461
 
475
 
extern boost::mutex THR_LOCK_myisam;
 
462
extern pthread_mutex_t THR_LOCK_myisam;
476
463
 
477
464
        /* Some extern variables */
478
465
 
717
704
                           const unsigned char *record, drizzled::internal::my_off_t pos);
718
705
int mi_unique_comp(MI_UNIQUEDEF *def, const unsigned char *a, const unsigned char *b,
719
706
                   bool null_are_equal);
 
707
void mi_get_status(void* param, int concurrent_insert);
 
708
void mi_update_status(void* param);
 
709
void mi_restore_status(void* param);
 
710
void mi_copy_status(void* to,void *from);
 
711
bool mi_check_status(void* param);
720
712
 
721
713
extern MI_INFO *test_if_reopen(char *filename);
722
714
bool check_table_is_closed(const char *name, const char *where);