diff options
author | unknown <serg@sergbook.mysql.com> | 2003-03-24 11:19:28 +0100 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2003-03-24 11:19:28 +0100 |
commit | bd294f07c55bc2ac7b8e13b5c35735033cea0cab (patch) | |
tree | 084434ac9deb25d3782c5f026e39743224fffb0c /myisam | |
parent | fd8972cfa738af8f18f34f5bcd6b7f8d82e3b9f5 (diff) | |
download | mariadb-git-bd294f07c55bc2ac7b8e13b5c35735033cea0cab.tar.gz |
make myisam usable without threads (and even w/o pthread_t)
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 6 | ||||
-rw-r--r-- | myisam/sort.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index ca5c8f9ecb4..5cbe0a7d2f3 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -2109,7 +2109,7 @@ err: Threaded repair of table using sorting SYNOPSIS - mi_repair_by_sort_r() + mi_repair_parallel() param Repair parameters info MyISAM handler to repair name Name of table (for warnings) @@ -2128,6 +2128,9 @@ err: int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, const char * name, int rep_quick) { +#ifndef THREAD + return mi_repair_by_sort(param, info, name, rep_quick); +#else int got_error; uint i,key, total_key_length, istep; ulong rec_length; @@ -2489,6 +2492,7 @@ err: share->pack.header_length=0; } DBUG_RETURN(got_error); +#endif /* THREAD */ } /* Read next record and return next key */ diff --git a/myisam/sort.c b/myisam/sort.c index f45ecbaf3a1..ddf565d5092 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -275,6 +275,7 @@ static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys, } /* find_all_keys */ +#ifdef THREAD /* Search after all keys and place them in a temp. file */ pthread_handler_decl(thr_find_all_keys,arg) @@ -284,7 +285,7 @@ pthread_handler_decl(thr_find_all_keys,arg) uint memavl,old_memavl,keys,sort_length; uint idx, maxbuffer; uchar **sort_keys=0; - + error=1; if (my_thread_init()) @@ -542,6 +543,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) my_free((gptr) mergebuf,MYF(MY_ALLOW_ZERO_PTR)); return got_error; } +#endif /* THREAD */ /* Write all keys in memory to file for later merge */ |