diff options
author | unknown <serg@serg.mylan> | 2005-09-21 13:53:22 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-09-21 13:53:22 +0200 |
commit | aa7bc459f7b4854d032b5605f73f7faa1fad5b2b (patch) | |
tree | 29a5373cf28e87e844da3557b032013adcdbcbe8 /myisam/myisamchk.c | |
parent | 56264f9a5c795d741ce29a85327434b0c9b5f3a3 (diff) | |
parent | 30681cf509f455506b8ff809369561734fdc82c2 (diff) | |
download | mariadb-git-aa7bc459f7b4854d032b5605f73f7faa1fad5b2b.tar.gz |
merged
VC++Files/mysys/mysys.dsp:
Auto merged
VC++Files/mysys/mysys_ia64.dsp:
Auto merged
client/mysql.cc:
Auto merged
include/my_sys.h:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/rpl_multi_delete2.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/rpl_multi_delete2-slave.opt:
Auto merged
mysql-test/t/rpl_multi_delete2.test:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'myisam/myisamchk.c')
-rw-r--r-- | myisam/myisamchk.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 78ae756bf7c..cfc3930779f 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -67,6 +67,7 @@ static const char *field_pack[]= "no zeros", "blob", "constant", "table-lockup", "always zero","varchar","unique-hash","?","?"}; +static const char *myisam_stats_method_str="nulls_inequal"; static void get_options(int *argc,char * * *argv); static void print_version(void); @@ -155,7 +156,7 @@ enum options_mc { OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE, OPT_SORT_BUFFER_SIZE, OPT_SORT_KEY_BLOCKS, OPT_DECODE_BITS, OPT_FT_MIN_WORD_LEN, OPT_FT_MAX_WORD_LEN, OPT_FT_STOPWORD_FILE, - OPT_MAX_RECORD_LENGTH, OPT_AUTO_CLOSE + OPT_MAX_RECORD_LENGTH, OPT_AUTO_CLOSE, OPT_STATS_METHOD }; static struct my_option my_long_options[] = @@ -336,6 +337,11 @@ static struct my_option my_long_options[] = "Use stopwords from this file instead of built-in list.", (gptr*) &ft_stopword_file, (gptr*) &ft_stopword_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"stats_method", OPT_STATS_METHOD, + "Specifies how index statistics collection code should threat NULLs. " + "Possible values of name are \"nulls_inequal\" (default behavior for 4.1/5.0), and \"nulls_equal\" (emulate 4.0 behavior).", + (gptr*) &myisam_stats_method_str, (gptr*) &myisam_stats_method_str, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -465,6 +471,12 @@ static void usage(void) #include <help_end.h> +const char *myisam_stats_method_names[] = {"nulls_inequal", "nulls_equal", + NullS}; +TYPELIB myisam_stats_method_typelib= { + array_elements(myisam_stats_method_names) - 1, "", + myisam_stats_method_names, NULL}; + /* Read options */ static my_bool @@ -684,6 +696,19 @@ get_one_option(int optid, else check_param.testflag|= T_CALC_CHECKSUM; break; + case OPT_STATS_METHOD: + { + myisam_stats_method_str= argument; + int method; + if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0) + { + fprintf(stderr, "Invalid value of stats_method: %s.\n", argument); + exit(1); + } + check_param.stats_method= test(method-1)? MI_STATS_METHOD_NULLS_EQUAL : + MI_STATS_METHOD_NULLS_NOT_EQUAL; + break; + } #ifdef DEBUG /* Only useful if debugging */ case OPT_START_CHECK_POS: check_param.start_check_pos= strtoull(argument, NULL, 0); |