summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-02-11 21:15:24 +0200
committerMichael Widenius <monty@askmonty.org>2010-02-11 21:15:24 +0200
commit6e0d92419e1d251854ef08dcdf901427ad81ea3e (patch)
tree7fd661c34d3edede04f058929c0b9ec01634e1cb /sql
parentaf51917d1e2e47eaee5e39a3d83ce09815ab4d1c (diff)
downloadmariadb-git-6e0d92419e1d251854ef08dcdf901427ad81ea3e.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index bf09df8a465..5eb18ddda80 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -598,6 +598,7 @@ char *mysqld_unix_port, *opt_mysql_tmpdir;
const char **errmesg; /**< Error messages */
const char *myisam_recover_options_str="OFF";
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 */
const char *in_left_expr_name= "<left expr>";
@@ -7290,7 +7291,8 @@ The minimum value for this variable is 4096.",
1024, 0},
{"thread_handling", OPT_THREAD_HANDLING,
"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},
{"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).",
@@ -8721,14 +8723,15 @@ mysqld_get_one_option(int optid,
break;
}
case OPT_ONE_THREAD:
- global_system_variables.thread_handling=
- SCHEDULER_ONE_THREAD_PER_CONNECTION;
+ global_system_variables.thread_handling= SCHEDULER_NO_THREADS;
+ opt_thread_handling= thread_handling_typelib.type_names[global_system_variables.thread_handling];
break;
case OPT_THREAD_HANDLING:
{
int id;
if (!find_opt_type(argument, &thread_handling_typelib, opt->name, &id))
global_system_variables.thread_handling= id - 1;
+ opt_thread_handling= thread_handling_typelib.type_names[global_system_variables.thread_handling];
break;
}
case OPT_FT_BOOLEAN_SYNTAX: