summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-03-18 00:16:04 +0200
committermonty@mysql.com <>2004-03-18 00:16:04 +0200
commit53c810cda446a060d4b9f41040f9227313c24ba1 (patch)
tree2bd46f92f467b68e9b652a280b512a9cf0413ca2 /myisam
parent43706715daf1039a772c2d2aaceae0ef93ffe037 (diff)
parentf34a642d6e492fa527e09593aa695e67d3867263 (diff)
downloadmariadb-git-53c810cda446a060d4b9f41040f9227313c24ba1.tar.gz
merge fixes (use old code)
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_boolean_search.c8
-rw-r--r--myisam/mi_check.c4
-rw-r--r--myisam/myisam_ftdump.c2
-rw-r--r--myisam/myisamchk.c4
4 files changed, 11 insertions, 7 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c
index 447744b0521..bff1232750e 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -54,8 +54,9 @@ static double _nwghts[11]=
static double *nwghts=_nwghts+5; /* nwghts[i] = -0.5*1.5**i */
#define FTB_FLAG_TRUNC 1 /* MUST be 1 */
-#define FTB_FLAG_YES 2 /* These two - YES and NO */
-#define FTB_FLAG_NO 4 /* should NEVER be set both */
+#define FTB_FLAG_YES 2 /* no two from these three */
+#define FTB_FLAG_NO 4 /* YES, NO, WONLY */
+#define FTB_FLAG_WONLY 8 /* should be ever set both */
typedef struct st_ftb_expr FTB_EXPR;
struct st_ftb_expr
@@ -504,7 +505,8 @@ static void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_
ftbe->cur_weight += weight;
if ((int) ftbe->yesses < ythresh)
break;
- yn= ((int) ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ;
+ if (!(yn & FTB_FLAG_WONLY))
+ yn= ((int) ftbe->yesses++ == ythresh) ? ftbe->flags : FTB_FLAG_WONLY ;
weight*= ftbe->weight;
}
}
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index e80eaebe093..cdaed59cd01 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -98,7 +98,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info)
/* Don't count this as a real warning, as check can correct this ! */
uint save=param->warning_printed;
mi_check_print_warning(param,
- "%d clients is using or hasn't closed the table properly",
+ share->state.open_count==1 ?
+ "%d client is using or hasn't closed the table properly" :
+ "%d clients are using or haven't closed the table properly",
share->state.open_count);
/* If this will be fixed by the check, forget the warning */
if (param->testflag & T_UPDATE_STATE)
diff --git a/myisam/myisam_ftdump.c b/myisam/myisam_ftdump.c
index 015604aa1ad..7d1b20eb854 100644
--- a/myisam/myisam_ftdump.c
+++ b/myisam/myisam_ftdump.c
@@ -267,7 +267,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
static void usage()
{
- printf("Use: ft_dump <table_name> <index_no>\n");
+ printf("Use: myisam_ftdump <table_name> <index_num>\n");
my_print_help(my_long_options);
my_print_variables(my_long_options);
exit(1);
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index a7528a14353..8a87f307a67 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -170,7 +170,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.",
- (gptr*) &set_charset_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (gptr*) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c',
"Check table for errors.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -253,7 +253,7 @@ static struct my_option my_long_options[] =
0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"set-character-set", OPT_SET_CHARSET,
"Change the character set used by the index",
- 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (gptr*) &set_charset_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},