diff options
-rw-r--r-- | Docs/manual.texi | 12 | ||||
-rw-r--r-- | myisam/mi_check.c | 35 | ||||
-rw-r--r-- | myisam/myisamchk.c | 2 | ||||
-rw-r--r-- | myisam/myisamdef.h | 1 | ||||
-rw-r--r-- | mysys/getvar.c | 7 |
5 files changed, 33 insertions, 24 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index be16d266166..33e046fba53 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -22806,8 +22806,8 @@ The disadvantages with @code{MERGE} tables are: @itemize @bullet @item -You can't use @code{INSERT} on @code{MERGE} tables, as @strong{MySQL} can't know -in which of the tables we should insert the row. +You can't use @code{INSERT} on @code{MERGE} tables, as @strong{MySQL} +can't know in which of the tables we should insert the row. @item You can only use identical @code{MyISAM} tables for a @code{MERGE} table. @item @@ -22825,7 +22825,11 @@ will need to read the next key block. This makes @code{MERGE} keys much slower on @code{eq_ref} searches, but not much slower on @code{ref} searches. @xref{EXPLAIN}. @item -You can't yet easily map the @code{MERGE} table from within @strong{MySQL}. +You can't do @code{DROP TABLE}, @code{ALTER TABLE} or @code{DELETE FROM +table_name} without a @code{WHERE} clause on any of the table that is +mapped by a @code{MERGE} table that is 'open'. If you do this, the +@code{MERGE} table may still refer to the original table and you will +get unexpected results. @end itemize The following example shows you how to use @code{MERGE} tables: @@ -41442,6 +41446,8 @@ not yet 100 % confident in this code. @appendixsubsec Changes in release 3.23.34 @itemize @bullet @item +Allow space around @code{=} in argument to @code{--set-variable}. +@item Fixed problem in automatic repair that could let some threads in state @code{Waiting for table}. @item 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 diff --git a/mysys/getvar.c b/mysys/getvar.c index a86215ea56b..21cac7f0d61 100644 --- a/mysys/getvar.c +++ b/mysys/getvar.c @@ -53,15 +53,16 @@ my_bool set_changeable_var(my_string str,CHANGEABLE_VAR *vars) else { uint length,found_count=0; - CHANGEABLE_VAR *var,*found, *var_end; + CHANGEABLE_VAR *var,*found; + my_string var_end; const char *name; long num; /* Skip end space from variable */ - for (var_end=end ; end > str && is_space(end[-1]) ; end--) ; + for (var_end=end ; end > str && isspace(var_end[-1]) ; var_end--) ; length=(uint) (var_end-str); /* Skip start space from argument */ - for (end++ ; is_space(*end) ; end++) ; + for (end++ ; isspace(*end) ; end++) ; for (var=vars,found=0 ; (name=var->name) ; var++) { |