summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-03-16 22:41:30 +0200
committermonty@mysql.com <>2004-03-16 22:41:30 +0200
commit350b4335696fc88efa2bbf2139d2f8bf9aa5701c (patch)
treeaf285d8080c003d1ecb1479ec43c9b6996fd567f /myisam
parent861bf3c8c031ea80076acb7f7466bda73b23213c (diff)
parent325f6615254c871d71d9d71bb5910a61d9a61ea2 (diff)
downloadmariadb-git-350b4335696fc88efa2bbf2139d2f8bf9aa5701c.tar.gz
merge with 4.0
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_boolean_search.c8
-rw-r--r--myisam/mi_check.c4
-rw-r--r--myisam/myisamchk.c4
3 files changed, 10 insertions, 6 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 4d29838ecd0..27b918fb0c7 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/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},