summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-10-22 00:30:17 +0000
committerunknown <serg@serg.mysql.com>2002-10-22 00:30:17 +0000
commitfafb58e31ec60dc844e154d39ae86264f46cafa1 (patch)
tree5551d2fcba6d3ff5eade6531f1dbba65f8345def /myisam
parenta336aba95c9aa931a9897d8a4ef02ef2b9bdee78 (diff)
parent2f5ded0ae49d121e5adffeba23fd06384053b9cb (diff)
downloadmariadb-git-fafb58e31ec60dc844e154d39ae86264f46cafa1.tar.gz
Merge work:/home/bk/mysql-4.1
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.1 BitKeeper/etc/gone: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-skipkeys~56cb758b36258d1c: 'Auto converge rename'
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c5
-rw-r--r--myisam/myisamchk.c4
-rw-r--r--myisam/myisamdef.h1
-rw-r--r--myisam/sort.c7
4 files changed, 15 insertions, 2 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index aa1043b2bf8..ba90b2c5bcf 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -2508,7 +2508,7 @@ static int sort_key_read(MI_SORT_PARAM *sort_param, void *key)
DBUG_RETURN(1);
}
sort_param->real_key_length=
- (info->s->rec_reflength+
+ (info->s->rec_reflength+
_mi_make_key(info, sort_param->key, (uchar*) key,
sort_param->record, sort_param->filepos));
#ifdef HAVE_purify
@@ -2587,6 +2587,9 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
char llbuff[22],llbuff2[22];
DBUG_ENTER("sort_get_next_record");
+ if (*killed_ptr(param))
+ DBUG_RETURN(1);
+
switch (share->data_file_type) {
case STATIC_RECORD:
for (;;)
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 656d536f159..ca4e430d49b 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -1636,6 +1636,10 @@ err:
DBUG_RETURN(1);
} /* sort_record_index */
+volatile bool *killed_ptr(MI_CHECK *param)
+{
+ return (bool *)(param->thd); /* always NULL */
+}
/* print warnings and errors */
/* VARARGS */
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index 7f8b6dc41fd..6499021861e 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -648,6 +648,7 @@ void mi_setup_functions(register MYISAM_SHARE *share);
int _mi_init_bulk_insert(MI_INFO *info, ulong cache_size);
/* Functions needed by mi_check */
+volatile bool *killed_ptr(MI_CHECK *param);
void mi_check_print_error _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_warning _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...));
diff --git a/myisam/sort.c b/myisam/sort.c
index 5819fb7b493..0e69e41ed5c 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -284,7 +284,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())
@@ -701,6 +701,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
uchar *strpos;
BUFFPEK *buffpek,**refpek;
QUEUE queue;
+ volatile bool *killed= killed_ptr(info->sort_info->param);
DBUG_ENTER("merge_buffers");
count=error=0;
@@ -732,6 +733,10 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
{
for (;;)
{
+ if (*killed)
+ {
+ error=1; goto err;
+ }
buffpek=(BUFFPEK*) queue_top(&queue);
if (to_file)
{