summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-05 19:38:42 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-05 19:38:42 +0200
commit6d33f73416b5576b4e48412fd3a7342385c1c747 (patch)
tree56f9dc35fe3c9e6c4f341e577ff3db68855d9e81 /myisam
parent930b3fa897112c49392c2154de1ec21b9e44edda (diff)
parent9b5167eeac3e8d14134769334d94f260cb5db277 (diff)
downloadmariadb-git-6d33f73416b5576b4e48412fd3a7342385c1c747.tar.gz
Merge with 4.0.6
BitKeeper/etc/ignore: auto-union acinclude.m4: Auto merged configure.in: Auto merged heap/hp_delete.c: Auto merged heap/hp_scan.c: Auto merged include/my_base.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_check.c: Auto merged myisam/mi_rnext_same.c: Auto merged myisam/sort.c: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/distinct.result: Auto merged mysql-test/r/func_math.result: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/group_by.test: Auto merged mysql-test/t/select.test: Auto merged mysys/hash.c: Auto merged sql/field.h: Auto merged sql/field_conv.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/handler.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_sum.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_udf.cc: Auto merged sql/structs.h: Auto merged sql/uniques.cc: Auto merged strings/strto.c: Auto merged vio/vio.c: Auto merged BitKeeper/triggers/post-commit: Add changeset to commit messages sql-bench/crash-me.sh: Use version from 4.0 sql-bench/server-cfg.sh: Use version from 4.0
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c12
-rw-r--r--myisam/mi_extra.c4
-rw-r--r--myisam/mi_rnext_same.c5
-rw-r--r--myisam/sort.c22
4 files changed, 24 insertions, 19 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index d3222a770a8..34222a5703b 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/mi_rnext_same.c b/myisam/mi_rnext_same.c
index 88146c89f85..200e715bddc 100644
--- a/myisam/mi_rnext_same.c
+++ b/myisam/mi_rnext_same.c
@@ -28,14 +28,13 @@
int mi_rnext_same(MI_INFO *info, byte *buf)
{
int error;
- uint inx,flag,not_used;
+ uint inx,not_used;
MI_KEYDEF *keyinfo;
DBUG_ENTER("mi_rnext_same");
if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR)
DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);
keyinfo=info->s->keyinfo+inx;
- flag=SEARCH_BIGGER; /* Read next */
if (fast_mi_readinfo(info))
DBUG_RETURN(my_errno);
@@ -57,7 +56,7 @@ int mi_rnext_same(MI_INFO *info, byte *buf)
for (;;)
{
if ((error=_mi_search_next(info,keyinfo,info->lastkey,
- info->lastkey_length,flag,
+ info->lastkey_length,SEARCH_BIGGER,
info->s->state.key_root[inx])))
break;
if (ha_key_cmp(keyinfo->seg,info->lastkey2,info->lastkey,
diff --git a/myisam/sort.c b/myisam/sort.c
index c9ba0f51d9c..7ad23df9358 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -376,7 +376,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);
@@ -456,9 +455,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)
{
@@ -484,15 +483,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;