1137
1133
SHOW_VAR com_status_vars[]= {
1138
1134
{"admin_commands", (char*) offsetof(STATUS_VAR, com_other), SHOW_LONG_STATUS},
1139
{"assign_to_keycache", (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_ASSIGN_TO_KEYCACHE]), SHOW_LONG_STATUS},
1140
1135
{"alter_db", (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_ALTER_DB]), SHOW_LONG_STATUS},
1141
1136
{"alter_table", (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_ALTER_TABLE]), SHOW_LONG_STATUS},
1142
1137
{"analyze", (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_ANALYZE]), SHOW_LONG_STATUS},
1947
1939
"writes) to as much as you can afford;"),
1948
1940
(char**) &dflt_key_cache_var.param_buff_size,
1950
0, (GET_ULL | GET_ASK_ADDR),
1951
1943
REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, SIZE_T_MAX, MALLOC_OVERHEAD,
1953
1945
{"key_cache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
1957
1949
"total number of blocks in key cache"),
1958
1950
(char**) &dflt_key_cache_var.param_age_threshold,
1960
0, (GET_UINT32 | GET_ASK_ADDR), REQUIRED_ARG,
1952
0, (GET_UINT32), REQUIRED_ARG,
1961
1953
300, 100, ULONG_MAX, 0, 100, 0},
1962
1954
{"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
1963
1955
N_("The default size of key cache blocks"),
1964
1956
(char**) &dflt_key_cache_var.param_block_size,
1966
0, (GET_UINT32 | GET_ASK_ADDR), REQUIRED_ARG,
1958
0, (GET_UINT32), REQUIRED_ARG,
1967
1959
KEY_CACHE_BLOCK_SIZE, 512, 1024 * 16, 0, 512, 0},
1968
1960
{"key_cache_division_limit", OPT_KEY_CACHE_DIVISION_LIMIT,
1969
1961
N_("The minimum percentage of warm blocks in key cache"),
1970
1962
(char**) &dflt_key_cache_var.param_division_limit,
1972
0, (GET_UINT32 | GET_ASK_ADDR) , REQUIRED_ARG, 100,
1964
0, (GET_UINT32) , REQUIRED_ARG, 100,
1973
1965
1, 100, 0, 1, 0},
1974
1966
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
1975
1967
N_("Max packetlength to send/receive from to server."),
2380
2372
myisam_stats_method_str= "nulls_unequal";
2381
2373
session_list.clear();
2383
if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str,
2384
default_key_cache_base.length)))
2386
/* set key_cache_hash.default_value = dflt_key_cache */
2387
multi_keycache_init();
2389
2375
/* Set directory paths */
2390
2376
strncpy(language, LANGUAGE, sizeof(language)-1);
2578
/** Handle arguments for multiple key caches. */
2580
extern "C" char **drizzle_getopt_value(const char *keyname, uint32_t key_length,
2581
const struct my_option *option);
2584
drizzle_getopt_value(const char *keyname, uint32_t key_length,
2585
const struct my_option *option)
2587
switch (option->id) {
2588
case OPT_KEY_BUFFER_SIZE:
2589
case OPT_KEY_CACHE_BLOCK_SIZE:
2590
case OPT_KEY_CACHE_DIVISION_LIMIT:
2591
case OPT_KEY_CACHE_AGE_THRESHOLD:
2593
KEY_CACHE *key_cache;
2594
if (!(key_cache= get_or_create_key_cache(keyname, key_length)))
2596
switch (option->id) {
2597
case OPT_KEY_BUFFER_SIZE:
2598
return (char**) &key_cache->param_buff_size;
2599
case OPT_KEY_CACHE_BLOCK_SIZE:
2600
return (char**) &key_cache->param_block_size;
2601
case OPT_KEY_CACHE_DIVISION_LIMIT:
2602
return (char**) &key_cache->param_division_limit;
2603
case OPT_KEY_CACHE_AGE_THRESHOLD:
2604
return (char**) &key_cache->param_age_threshold;
2608
return (char **)option->value;
2612
2564
extern "C" void option_error_reporter(enum loglevel level, const char *format, ...);
2614
2566
void option_error_reporter(enum loglevel level, const char *format, ...)
2781
2732
/* Used templates */
2782
2733
template class I_List<i_string>;
2783
2734
template class I_List<i_string_pair>;
2784
template class I_List<NAMED_LIST>;
2785
2735
template class I_List<Statement>;
2786
2736
template class I_List_iterator<Statement>;