diff options
author | monty@donna.mysql.com <> | 2001-02-18 01:39:09 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-02-18 01:39:09 +0200 |
commit | 0ccc30f40ca74d22a5eec2c7fb87411d335d7d77 (patch) | |
tree | a71adb492b010c65e397e8033731c071e4c200a2 /myisam | |
parent | abc5ef2b3e5c32eddd7b68038ebb6564fdc4474a (diff) | |
download | mariadb-git-0ccc30f40ca74d22a5eec2c7fb87411d335d7d77.tar.gz |
Fixed that myisamchk -R works on text columns
Fixed typo when removing space from argument to -O
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 35 | ||||
-rw-r--r-- | myisam/myisamchk.c | 2 | ||||
-rw-r--r-- | myisam/myisamdef.h | 1 |
3 files changed, 20 insertions, 18 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index ec87563981c..c0183496df9 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1723,6 +1723,23 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, printf("- recovering (with sort) MyISAM-table '%s'\n",name); printf("Data records: %s\n", llstr(start_records,llbuff)); } + + /* Hmm, repair_by_sort uses find_all_keys, and find_all_keys strictly + implies "one row - one key per keynr", while for ft_key one row/keynr + can produce as many keys as the number of unique words in the text + that's why I disabled repair_by_sort for ft-keys. (serg) + */ + for (i=0 ; i < share->base.keys ; i++) + { + if ((((ulonglong) 1 << i) & key_map) && + (share->keyinfo[i].flag & HA_FULLTEXT)) + { + mi_check_print_error(param, + "Can`t use repair_by_sort with FULLTEXT key"); + DBUG_RETURN(1); + } + } + bzero((char*) sort_info,sizeof(*sort_info)); if (!(sort_info->key_block= alloc_key_blocks(param, @@ -2040,22 +2057,8 @@ static int sort_key_read(SORT_INFO *sort_info, void *key) "Found too many records; Can`t continue"); DBUG_RETURN(1); } - /* Hmm, repair_by_sort uses find_all_keys, and find_all_keys strictly - implies "one row - one key per keynr", while for ft_key one row/keynr - can produce as many keys as the number of unique words in the text - that's why I disabled repair_by_sort for ft-keys. (serg) - */ - if (sort_info->keyinfo->flag & HA_FULLTEXT ) - { - mi_check_print_error(sort_info->param, - "Can`t use repair_by_sort with FULLTEXT key"); - DBUG_RETURN(1); - } - else - { - VOID(_mi_make_key(info,sort_info->key,key,sort_info->record, - sort_info->filepos)); - } + (void) _mi_make_key(info,sort_info->key,key,sort_info->record, + sort_info->filepos); DBUG_RETURN(sort_write_record(sort_info)); } /* sort_key_read */ diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 66a059c0f20..220040fcc0a 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -201,7 +201,7 @@ static struct option long_options[] = static void print_version(void) { - printf("%s Ver 1.44 for %s at %s\n",my_progname,SYSTEM_TYPE, + printf("%s Ver 1.45 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index 8b50f0111c6..dde2651c0c9 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -16,7 +16,6 @@ /* This file is included by all internal myisam files */ -#define ISAM_LIBRARY #include "myisam.h" /* Structs & some defines */ #include "myisampack.h" /* packing of keys */ #ifdef THREAD |