diff options
author | serg@serg.mysql.com <> | 2002-06-30 14:17:29 +0000 |
---|---|---|
committer | serg@serg.mysql.com <> | 2002-06-30 14:17:29 +0000 |
commit | 53ac59b913a57d0fddc3c7c4edb1433c2c70b768 (patch) | |
tree | d21dcff9bca4b293a433b84b9356e37d0531494b /include | |
parent | 3bd8dba6a8d213c246cf4ca50684810206167225 (diff) | |
download | mariadb-git-53ac59b913a57d0fddc3c7c4edb1433c2c70b768.tar.gz |
"myisamchk -p" for parallel recover works (no extensive testing though)
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 27 | ||||
-rw-r--r-- | include/myisam.h | 4 |
2 files changed, 5 insertions, 26 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 4ddd204c406..6085724c329 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -322,29 +322,6 @@ typedef struct st_io_cache_share my_bool alloced; #endif } IO_CACHE_SHARE; - -#define lock_io_cache(info) \ - ( \ - (errno=pthread_mutex_lock(&((info)->share->mutex))) ? -1 : ( \ - (info)->share->count ? ( \ - --((info)->share->count), \ - pthread_cond_wait(&((info)->share->cond), \ - &((info)->share->mutex)), \ - (++((info)->share->count) ? \ - pthread_mutex_unlock(&((info)->share->mutex)) : 0)) \ - : 1 ) \ - ) - -#define unlock_io_cache(info) \ - ( \ - pthread_cond_broadcast(&((info)->share->cond)), \ - pthread_mutex_unlock (&((info)->share->mutex)) \ - ) -/* -- to catch errors -#else -#define lock_io_cache(info) -#define unlock_io_cache(info) -*/ #endif typedef struct st_io_cache /* Used when cacheing files */ @@ -686,9 +663,9 @@ extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); #ifdef THREAD extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count); -extern int init_io_cache_share(IO_CACHE *info, +extern void init_io_cache_share(IO_CACHE *info, IO_CACHE_SHARE *s, uint num_threads); -extern int remove_io_thread(IO_CACHE *info); +extern void remove_io_thread(IO_CACHE *info); #endif extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count); diff --git a/include/myisam.h b/include/myisam.h index 32e9225efdf..57d219ab358 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -382,7 +382,7 @@ typedef struct st_mi_sort_param IO_CACHE tempfile, tempfile_for_exceptions; DYNAMIC_ARRAY buffpek; my_off_t pos,max_pos,filepos,start_recpos; - my_bool fix_datafile; + my_bool fix_datafile, master; char *record; char *tmpdir; int (*key_cmp)(struct st_mi_sort_param *, const void *, const void *); @@ -403,6 +403,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name); int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, const char * name, int rep_quick); +int mi_repair_parallel(MI_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, uint raid_chunks, myf myflags); |