Commit 95db16d4 authored by Michael Widenius's avatar Michael Widenius

Fix for LPBug#520243: useability bug of thread pool configuration

Now mysqld --help --verbose shows the value for thread-handling
Fixed also that mysqld --one-thread works as expected.
parent d01b9d0e
...@@ -598,6 +598,7 @@ char *mysqld_unix_port, *opt_mysql_tmpdir; ...@@ -598,6 +598,7 @@ char *mysqld_unix_port, *opt_mysql_tmpdir;
const char **errmesg; /**< Error messages */ const char **errmesg; /**< Error messages */
const char *myisam_recover_options_str="OFF"; const char *myisam_recover_options_str="OFF";
const char *myisam_stats_method_str="nulls_unequal"; const char *myisam_stats_method_str="nulls_unequal";
const char *opt_thread_handling= thread_handling_typelib.type_names[0];
/** name of reference on left espression in rewritten IN subquery */ /** name of reference on left espression in rewritten IN subquery */
const char *in_left_expr_name= "<left expr>"; const char *in_left_expr_name= "<left expr>";
...@@ -7290,7 +7291,8 @@ The minimum value for this variable is 4096.", ...@@ -7290,7 +7291,8 @@ The minimum value for this variable is 4096.",
1024, 0}, 1024, 0},
{"thread_handling", OPT_THREAD_HANDLING, {"thread_handling", OPT_THREAD_HANDLING,
"Define threads usage for handling queries: " "Define threads usage for handling queries: "
"one-thread-per-connection or no-threads", 0, 0, "one-thread-per-connection or no-threads",
(uchar**) &opt_thread_handling, (uchar**) &opt_thread_handling,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"updatable_views_with_limit", OPT_UPDATABLE_VIEWS_WITH_LIMIT, {"updatable_views_with_limit", OPT_UPDATABLE_VIEWS_WITH_LIMIT,
"1 = YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is used in queries with a LIMIT clause for updating. 0 = NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools).", "1 = YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is used in queries with a LIMIT clause for updating. 0 = NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools).",
...@@ -8721,14 +8723,15 @@ mysqld_get_one_option(int optid, ...@@ -8721,14 +8723,15 @@ mysqld_get_one_option(int optid,
break; break;
} }
case OPT_ONE_THREAD: case OPT_ONE_THREAD:
global_system_variables.thread_handling= global_system_variables.thread_handling= SCHEDULER_NO_THREADS;
SCHEDULER_ONE_THREAD_PER_CONNECTION; opt_thread_handling= thread_handling_typelib.type_names[global_system_variables.thread_handling];
break; break;
case OPT_THREAD_HANDLING: case OPT_THREAD_HANDLING:
{ {
int id; int id;
if (!find_opt_type(argument, &thread_handling_typelib, opt->name, &id)) if (!find_opt_type(argument, &thread_handling_typelib, opt->name, &id))
global_system_variables.thread_handling= id - 1; global_system_variables.thread_handling= id - 1;
opt_thread_handling= thread_handling_typelib.type_names[global_system_variables.thread_handling];
break; break;
} }
case OPT_FT_BOOLEAN_SYNTAX: case OPT_FT_BOOLEAN_SYNTAX:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment