From f43600cdd6268b2aa7c69f7a7e73d49d6c701dd6 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sat, 22 Feb 2003 11:44:26 +0100 Subject: do not accept -R (sort by index) for FULLTEXT indexes --- myisam/myisamchk.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'myisam/myisamchk.c') diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 6c541a444b7..08301af506a 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -1402,6 +1402,13 @@ static int mi_sort_records(MI_CHECK *param, param->error_printed=0; DBUG_RETURN(-1); } + if (keyinfo->flag & HA_FULLTEXT) + { + mi_check_print_error(param,"Can't sort table '%s' on FULLTEXT key %d", + name,sort_key+1); + param->error_printed=0; + DBUG_RETURN(-1); + } if (!(param->testflag & T_SILENT)) { printf("- Sorting records for MyISAM-table '%s'\n",name); -- cgit v1.2.1 From 55ae7d26f6e9d453ca256256dc64b994fe7b5e3c Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sat, 22 Feb 2003 15:51:21 +0100 Subject: make myisamchk -R to work, if the table contains fulltext indexes --- myisam/myisamchk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'myisam/myisamchk.c') diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 08301af506a..ac1d0fbfc4a 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -947,11 +947,11 @@ static int myisamchk(MI_CHECK *param, my_string filename) uint key; /* We can't update the index in mi_sort_records if we have a - prefix compressed index + prefix compressed or fulltext index */ my_bool update_index=1; for (key=0 ; key < share->base.keys; key++) - if (share->keyinfo[key].flag & HA_BINARY_PACK_KEY) + if (share->keyinfo[key].flag & (HA_BINARY_PACK_KEY|HA_FULLTEXT)) update_index=0; error=mi_sort_records(param,info,filename,param->opt_sort_key, -- cgit v1.2.1