summaryrefslogtreecommitdiff
path: root/include/myisam.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/myisam.h')
-rw-r--r--include/myisam.h45
1 files changed, 17 insertions, 28 deletions
diff --git a/include/myisam.h b/include/myisam.h
index 9fc17fdf2d6..0fd87839057 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000, 2011, Oracle and/or its affiliates. All rights
+ reserved
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,16 +22,9 @@
extern "C" {
#endif
-#ifndef _my_base_h
#include <my_base.h>
-#endif
-#ifndef _m_ctype_h
#include <m_ctype.h>
-#endif
-#ifndef _keycache_h
#include "keycache.h"
-#endif
-#include "my_handler.h"
#include "my_compare.h"
#include <myisamchk.h>
#include <mysql/plugin.h>
@@ -154,7 +148,7 @@ typedef struct st_mi_create_info
ulonglong data_file_length;
ulonglong key_file_length;
uint old_options;
- uint8 language;
+ uint16 language;
my_bool with_auto_increment;
} MI_CREATE_INFO;
@@ -245,13 +239,13 @@ extern ulong myisam_block_size;
extern ulong myisam_concurrent_insert;
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
extern my_off_t myisam_max_temp_length;
-extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
+extern ulong myisam_data_pointer_size;
/* usually used to check if a symlink points into the mysql data home */
/* which is normally forbidden */
extern int (*myisam_test_invalid_symlink)(const char *filename);
extern ulonglong myisam_mmap_size, myisam_mmap_used;
-extern pthread_mutex_t THR_LOCK_myisam_mmap;
+extern mysql_mutex_t THR_LOCK_myisam_mmap;
/* Prototypes for myisam-functions */
@@ -318,11 +312,9 @@ typedef struct st_mi_bit_buff
typedef struct st_sort_info
{
-#ifdef THREAD
/* sync things */
- pthread_mutex_t mutex;
- pthread_cond_t cond;
-#endif
+ mysql_mutex_t mutex;
+ mysql_cond_t cond;
MI_INFO *info;
HA_CHECK *param;
uchar *buff;
@@ -342,7 +334,7 @@ typedef struct st_mi_sort_param
IO_CACHE read_cache, tempfile, tempfile_for_exceptions;
DYNAMIC_ARRAY buffpek;
MI_BIT_BUFF bit_buff; /* For parallel repair of packrec. */
-
+
MI_KEYDEF *keyinfo;
MI_SORT_INFO *sort_info;
HA_KEYSEG *seg;
@@ -353,7 +345,7 @@ typedef struct st_mi_sort_param
uchar *record;
MY_TMPDIR *tmpdir;
- /*
+ /*
The next two are used to collect statistics, see update_key_parts for
description.
*/
@@ -370,14 +362,13 @@ typedef struct st_mi_sort_param
int (*key_read)(struct st_mi_sort_param *,void *);
int (*key_write)(struct st_mi_sort_param *, const void *);
void (*lock_in_memory)(HA_CHECK *);
- NEAR int (*write_keys)(struct st_mi_sort_param *, register uchar **,
- uint , struct st_buffpek *, IO_CACHE *);
- NEAR uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
- NEAR int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *,
- uint, uint);
+ int (*write_keys)(struct st_mi_sort_param *, register uchar **,
+ uint , struct st_buffpek *, IO_CACHE *);
+ uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
+ int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *,
+ uint, uint);
} MI_SORT_PARAM;
-
/* functions in mi_check */
void myisamchk_init(HA_CHECK *param);
int chk_status(HA_CHECK *param, MI_INFO *info);
@@ -393,9 +384,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick);
int change_to_newfile(const char * filename, const char * old_ext,
- const char * new_ext, time_t backup_time,
- uint raid_chunks,
- myf myflags);
+ const char * new_ext, time_t backup_time, myf myflags);
int lock_file(HA_CHECK *param, File file, my_off_t start, int lock_type,
const char *filetype, const char *filename);
void lock_memory(HA_CHECK *param);
@@ -403,7 +392,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
my_bool repair);
int update_state_info(HA_CHECK *param, MI_INFO *info,uint update);
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
- ulonglong *unique, ulonglong *notnull,
+ ulonglong *unique, ulonglong *notnull,
ulonglong records);
int filecopy(HA_CHECK *param, File to,File from,my_off_t start,
my_off_t length, const char *type);
@@ -419,7 +408,7 @@ my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map,
int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows);
void mi_flush_bulk_insert(MI_INFO *info, uint inx);
void mi_end_bulk_insert(MI_INFO *info);
-int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map,
+int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map,
KEY_CACHE *key_cache);
void mi_change_key_cache(KEY_CACHE *old_key_cache,
KEY_CACHE *new_key_cache);