diff options
author | monty@mashka.mysql.fi <> | 2002-11-29 16:40:18 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-11-29 16:40:18 +0200 |
commit | 6603d75213d45c9b75f7c5ab9e612663da943f61 (patch) | |
tree | 9914e2306a30c63d173b56a8ac8f100ee49823d7 /myisam | |
parent | fa7798596d409251d542c938b89e1b2e428c5ca7 (diff) | |
download | mariadb-git-6603d75213d45c9b75f7c5ab9e612663da943f61.tar.gz |
New multi-table-update code
New (simpler) internal timestamp handling.
More debuging to heap tables.
Small cleanups to multi-table-delete
false -> 0 and true -> 1 (We should use TRUE and FALSE)
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 12 | ||||
-rw-r--r-- | myisam/mi_extra.c | 4 | ||||
-rw-r--r-- | myisam/sort.c | 22 |
3 files changed, 22 insertions, 16 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 9e591325c1c..b984f0e6ee6 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -2329,13 +2329,13 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, for (i=0 ; i < sort_info.total_keys ; i++) { sort_param[i].read_cache=param->read_cache; + /* + two approaches: the same amount of memory for each thread + or the memory for the same number of keys for each thread... + In the second one all the threads will fill their sort_buffers + (and call write_keys) at the same time, putting more stress on i/o. + */ sort_param[i].sortbuff_size= - /* - two approaches: the same amount of memory for each thread - or the memory for the same number of keys for each thread... - In the second one all the threads will fill their sort_buffers - (and call write_keys) at the same time, putting more stress on i/o. - */ #ifndef USING_SECOND_APPROACH param->sort_buffer_length/sort_info.total_keys; #else diff --git a/myisam/mi_extra.c b/myisam/mi_extra.c index 39eb4b0bd99..d7a3aea516d 100644 --- a/myisam/mi_extra.c +++ b/myisam/mi_extra.c @@ -165,6 +165,10 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) HA_STATE_EXTEND_BLOCK); } break; + case HA_EXTRA_PREPARE_FOR_UPDATE: + if (info->s->data_file_type != DYNAMIC_RECORD) + break; + /* Remove read/write cache if dynamic rows */ case HA_EXTRA_NO_CACHE: if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { diff --git a/myisam/sort.c b/myisam/sort.c index fd5622e1340..f45ecbaf3a1 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -344,7 +344,6 @@ pthread_handler_decl(thr_find_all_keys,arg) mi_check_print_error(info->sort_info->param,"Sort buffer to small"); /* purecov: tested */ goto err; /* purecov: tested */ } -// (*info->lock_in_memory)(info->sort_info->param);/* Everything is allocated */ if (info->sort_info->param->testflag & T_VERBOSE) printf("Key %d - Allocating buffer for %d keys\n",info->key+1,keys); @@ -424,9 +423,9 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) byte *mergebuf=0; LINT_INIT(length); - for (i=0, sinfo=sort_param ; i<sort_info->total_keys ; i++, - rec_per_key_part+=sinfo->keyinfo->keysegs, - sinfo++) + for (i= 0, sinfo= sort_param ; + i < sort_info->total_keys ; + i++, rec_per_key_part+=sinfo->keyinfo->keysegs, sinfo++) { if (!sinfo->sort_keys) { @@ -452,15 +451,18 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) } } my_free((gptr) sinfo->sort_keys,MYF(0)); - my_free(mi_get_rec_buff_ptr(info, sinfo->rec_buff), MYF(MY_ALLOW_ZERO_PTR)); + my_free(mi_get_rec_buff_ptr(info, sinfo->rec_buff), + MYF(MY_ALLOW_ZERO_PTR)); sinfo->sort_keys=0; } - for (i=0, sinfo=sort_param ; i<sort_info->total_keys ; i++, - delete_dynamic(&sinfo->buffpek), - close_cached_file(&sinfo->tempfile), - close_cached_file(&sinfo->tempfile_for_exceptions), - sinfo++) + for (i= 0, sinfo= sort_param ; + i < sort_info->total_keys ; + i++, + delete_dynamic(&sinfo->buffpek), + close_cached_file(&sinfo->tempfile), + close_cached_file(&sinfo->tempfile_for_exceptions), + sinfo++) { if (got_error) continue; |