diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-28 17:26:11 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-28 17:26:11 +0300 |
commit | 7311cbe7dee5980d921ec43177fd268783eb18e2 (patch) | |
tree | 27f0f967ee5f642c6cb7ecfab977612a3d7e57d3 /myisam/mi_check.c | |
parent | a6ca5cbb9172ba7fb56834d78d6527525a59d1c3 (diff) | |
download | mariadb-git-7311cbe7dee5980d921ec43177fd268783eb18e2.tar.gz |
Updated windows files (VC++ files and winmysqladmin).
Portability fixes.
Removed compiler warnings.
VC++Files/client/mysql.dsp:
Updated to 4.0.2
VC++Files/client/mysqladmin.dsp:
Updated to 4.0.2
VC++Files/client/mysqlclient.dsp:
Updated to 4.0.2
VC++Files/client/mysqldump.dsp:
Updated to 4.0.2
VC++Files/client/mysqlimport.dsp:
Updated to 4.0.2
VC++Files/client/mysqlshow.dsp:
Updated to 4.0.2
VC++Files/innobase/innobase.dsp:
Updated to 4.0.2
VC++Files/libmysql/libmySQL.dsp:
Updated to 4.0.2
VC++Files/libmysqltest/myTest.dsp:
Updated to 4.0.2
VC++Files/merge/merge.dsp:
Updated to 4.0.2
VC++Files/myisam/myisam.dsp:
Updated to 4.0.2
VC++Files/mysql.dsw:
Updated to 4.0.2
VC++Files/mysqlbinlog/mysqlbinlog.dsp:
Updated to 4.0.2
VC++Files/mysqlcheck/mysqlcheck.dsp:
Updated to 4.0.2
VC++Files/mysqlmanager/MySqlManager.dsp:
Updated to 4.0.2
VC++Files/mysys/mysys.dsp:
Updated to 4.0.2
VC++Files/pack_isam/pack_isam.dsp:
Updated to 4.0.2
VC++Files/perror/perror.dsp:
Updated to 4.0.2
VC++Files/replace/replace.dsp:
Updated to 4.0.2
VC++Files/sql/mysqld.dsp:
Updated to 4.0.2
VC++Files/test1/test1.dsp:
Updated to 4.0.2
VC++Files/thr_insert_test/thr_insert_test.dsp:
Updated to 4.0.2
VC++Files/thr_test/thr_test.dsp:
Updated to 4.0.2
VC++Files/vio/vio.dsp:
Updated to 4.0.2
VC++Files/zlib/zlib.dsp:
Updated to 4.0.2
include/config-win.h:
Added isnan() and finite()
include/myisam.h:
Move thr_xxx functions to myisam_priv.h
myisam/mi_check.c:
Portability fix.
myisam/mi_locking.c:
Comment cleanup
myisam/myisamchk.c:
Removed compiler warning
myisam/myisamdef.h:
Added thr_xxx functions
myisam/sort.c:
Portability fix
sql/field.cc:
Portability fix
sql/sql_insert.cc:
R
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 9426a55e4d2..3c1d090f53d 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -2130,6 +2130,7 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info, IO_CACHE_SHARE io_share; SORT_INFO sort_info; ulonglong key_map=share->state.key_map; + pthread_attr_t thr_attr; DBUG_ENTER("mi_repair_by_sort_r"); start_records=info->state->records; @@ -2307,6 +2308,9 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info, pthread_mutex_lock(&sort_info.mutex); init_io_cache_share(¶m->read_cache, &io_share, i); + (void) pthread_attr_init(&thr_attr); + (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); + for (i=0 ; i < sort_info.total_keys ; i++) { sort_param[i].read_cache=param->read_cache; @@ -2322,8 +2326,9 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info, #else param->sort_buffer_length*sort_param[i].key_length/total_key_length; #endif - if (pthread_create(& sort_param[i].thr, 0, - (void *(*)(void*))_thr_find_all_keys, sort_param+i)) + if (pthread_create(&sort_param[i].thr, &thr_attr, + thr_find_all_keys, + (void *) (sort_param+i))) { mi_check_print_error(param,"Cannot start a repair thread"); remove_io_thread(¶m->read_cache); @@ -2332,13 +2337,14 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info, else sort_info.threads_running++; } + (void) pthread_attr_destroy(&thr_attr); /* waiting for all threads to finish */ while (sort_info.threads_running) pthread_cond_wait(&sort_info.cond, &sort_info.mutex); pthread_mutex_unlock(&sort_info.mutex); - if ((got_error= _thr_write_keys(sort_param))) + if ((got_error= thr_write_keys(sort_param))) { param->retry_repair=1; goto err; |